How to , and other stuff about linux, photo, php … Another blog just like others on internet

December 10, 2018

Your browser sent a request that this server could not understand

Filed under: Linux — Tags: , , , — admin @ 4:51 pm

Well today I am facing another problem.

Got this answer on a apache behind a proxy .

400 Bad Request
Bad Request
Your browser sent a request that this server could not understand.
Size of a request header field exceeds server limit.

So .. it appear the header that is received by webserver is bigger then normal .

Solution is to increase it .

LimitRequestFieldSize 32760
LimitRequestLine 32760

Please note that is loaded from first VirtualHost.

One solution is to tested with this

curl -v -H “CustomHeader: `printf ‘1%.0s’ {1..n}`” localhost

Where n can be replace with a value of for example 20000

 

November 22, 2018

Letsencrypt UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xfc in positio

Filed under: Linux — Tags: , , , — admin @ 12:16 pm

Well today I was trying to issue a ssl on a old server and find this

File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/augeas.py”, line 147, in get
return dec(value.value)
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/augeas.py”, line 65, in dec
return st.decode(AUGENC)
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xfc in position 15: invalid start byte
Please see the logfiles in /var/log/letsencrypt for more details.

A short workaround was to modify the

“/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/augeas.py”

the 65 line was something

return st.encode(AUGENC)

with

return st.decode(AUGENC, ‘ignore’)

It worked to get a new certificate .

September 13, 2018

Bypass Authentication Or Access Requirements .htpasswd

Filed under: Linux — Tags: , , , , — admin @ 9:43 am

Well if you are using letsencrypt with a password protected website is hard to renew the ssl because you need to bypass that .

If you have access to httpd conf the easy solution is to add this

 

<Directory /var/www/path/.well-known/>
  Order allow,deny
  Allow from all
  Satisfy any
</Directory>

Then restart the apache/httpd.


September 6, 2018

How to find out laptop model in windows

Filed under: Scrambled — Tags: — admin @ 10:06 am

Well beside stickers one command could be

wmic csproduct get name

 

April 25, 2018

apparmor=”DENIED” operation=”open” profile=”/usr/sbin/mysqld”

Filed under: Linux — Tags: , , — admin @ 12:07 pm

Today try to move the path of mysql to new one , because on ec2 I was left without space.

Well I have stopped the mysqld copy files modity the my.cnf with new datadir but when try to start .. well didn’t started .. After a little dmesg search see that on ubuntu is apparmor .

Try to make alias into file /etc/mysql/mysql.conf.d/mysqld.cnf  but didn’t resolve the problem

Find out that you have to edit also /etc/apparmor.d/usr.sbin.mysqld

and add

/db/data/mysql r

/db/data/mysql** rwk

After this mysqld started with new path.

Older Posts »

Powered by WordPress