AuthUserFile /path/to/.htpasswd AuthType basic AuthName "Restricted Access" require valid-user <Files admin-ajax.php> Order allow,deny Allow from all Satisfy any </Files> <Files admin-post.php> Order allow,deny Allow from all Satisfy any </Files> <Files "\.(css|gif|png|js)$"> Order allow,deny Allow from all Satisfy any </Files>
Take a look at the slashes on the proxy pass configurations!
[Wed Jul 19 16:08:45.679229 2017] [cgi:error] [pid 2954] [client 94.63.xxx.xxx:12439] End of script output before headers:4KUYWRBjpMFod9i.cgi
[Wed Jul 19 16:09:05.030839 2017] [cgi:error] [pid 783] [client 94.63.xxx.xxx:37260] AH01215: (2)No such file or directory: exec of ‘/home/webroot/nasamos.com/www/cgi-bin/x9uWvwAREeUkQn5p/4KUYWRBjpMFod9i.cgi’ failed
I saw a few blog posts and forum threads about this issue, but NONE was able to help me….
Yah!, syntax was okay….
perl -c 4KUYWRBjpMFod9i.cgi 4KUYWRBjpMFod9i.cgi syntax OK
I’v created a brand new file on /cgi-bin/ with some dummy filename and pumped a simple perl script on it…
#!/usr/bin/perl # hello.pl -- my first perl script! print "Content-type: text/html\n\n"; print "Hello, world!\n";
I was able to run it successfully, so…. the issue wasn’t on the CGI/PERL/APACHE/FIREWALL/SUEXEC.
I guess that the 4KUYWRBjpMFod9i.cgi had some issue… even using file -i it looked to be okay… I’v decided to copy the content of 4KUYWRBjpMFod9i.cgi to the new dummy cgi file … and it worked….
I guess that the issue was on the encoding of the original cgi…
[Sat May 27 07:17:27.539747 2017] [pagespeed:error] [pid 19961] [mod_pagespeed 18.104.22.168-0 @19961] Slow ReadFile operation on file /var/cache/mod_pagespeed/rname/ic_QOs6thfRpiBUn09lB5Du/http,3A/,2Fdomain.com/assets/slideshow/slide_02.jpg,40x,40._,: 59.944ms; configure SlowFileLatencyUs to change threshold\n
Some disk stats….
sudo hdparm -Tt /dev/root /dev/root: Timing cached reads: 26330 MB in 2.00 seconds = 13178.47 MB/sec Timing buffered disk reads: 540 MB in 3.00 seconds = 179.73 MB/sec
I’v added the following lines to my pagespeed configuration file (/etc/apache2/mods-enabled/pagespeed.conf)
Invalid command ‘SSLEngine’, perhaps misspelled or defined by a module not included in the server configuration
Probably you need to install mod_ssl….
yum install mod_ssl systemctl restart httpd
In our /etc/httpd/conf/httpd.conf lets see if we have the following lines on it.
Uncomment them or add them.
LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so LoadModule proxy_http_module modules/mod_proxy_http.so # Uncomment these to proxy FTP or HTTPS #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so #LoadModule proxy_connect_module modules/mod_proxy_connect.so
Example how to block a city with geoip apache module
<IfModule mod_geoip.c> Order Deny,Allow SetEnvIf GEOIP_CITY Phoenix BlockRegion SetEnvIf GEOIP_CITY Farmington BlockRegion Deny from env=BlockRegion Allow from 22.214.171.124 Allow from 126.96.36.199 </IfModule>
Invalid command ‘ProxyPreserveHost’, perhaps misspelled or defined by a module not included in the server configurationsudo a2enmod proxy
[Sun Feb 26 03:48:38.613627 2017] [proxy:warn] [pid 9117] [client 94.63.XXX.XXX:49486] AH01144: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.sudo a2enmod proxy_http
Restart apache and everything should be okay now.
here ‘ya go
sudo apt-get install php5-curl sudo service apache2 restart
.htaccess: Invalid command ‘ExpiresActive’, perhaps misspelled or defined by a module not included in the server configuration,
ln -s /etc/apache2/mods-available/expires.load /etc/apache2/mods-enabled/
.htaccess: Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration
At the end… restart Apache!
service apache2 restart