To enable SSL and use mod_pagespeed, you need to tell the mod, how to retrieve the resources. The way I need to work is using
ModPagespeedLoadFromFile "https://www.example.com" "/var/www/example/static/"
When I add this to my .htacces (with the correct url/directory), an internal server error occurs. Sadly no error is logged.
Server version: Apache/2.2.14 (Ubuntu)
Server built: Jul 22 2014 14:35:35
X-Mod-Pagespeed:1.9.32.1-4238
Is there anything that I am missing?
The directive may not be set in the .htaccess file. In the documentation it says so for other directives, but not the ModPagespeedLoadFromFile. It still applies here, you need to place it in your vhost configuration.
Related
I have a LAMP configured server and multiple times from the Apache error log file I can see warning messages like this one:
[Thu Jul 02 08:54:04.263981 2015] [:error] [pid 12059] [client 5.45.79.44:49144] script '/var/www/html/wp-update.php' not found or unable to stat, referer: http://example.org/wp-update.php
Currently I have mod_security and inside Wordpress Wordfence enabled.
What should be done in such cases to protect and prevent from these attacks?
Those warning messages can be ignored, since they are generated when Apache can't find the requested file (404) or permission to the requested file is denied (403).
I see tons of such messages daily in my server logs and the reason they appear is, that some automated scripts try to check your server for vulnerable/insecure scripts, that the admin may have forgotten. Lately I even noticed, that those kind of mass-requests even target SSH keys (GET /var/www/.ssh/id_rsa - just in case the server admin really misconfigured the server).
Running mod_security on your server with a tight ruleset (e.g. OWASP CRS) gives you a good basic protection against various kind of known/unknown attacks.
I have installed nagios successfully on fedora 17. but when I am trying to connect to nagios like http://mylocalhost.com/nagios. It asks for username and password. After putting these information I am found out forbidden 403 error with message , You dont have permission to access /nagios/ on this server.
I am bit confused how to resolve this issue. I read some post. they were saying to create empty index.html inside http root directory. i tried but same error is there.
http://www.unixmen.com/nagios-http-warning-http11-403-forbidden-solved/
If I am not wrong http root directory is /var/www/html?
oops ... sorry it was problem with my httpd service which was running actually but not accessible for publicly.
simply I flushed out iptables. then Checked out httpd service whether it is running properly or not.
Now its working great.
I think you create file index.html in /var/www/html.
After you can restart service nagios and httpd
I have set up ubuntu server on an old pc with webmin as well. I am not sure what was going on but i restarted the server and when it boots it now get this when Apache tries to start.
* Starting web server apache2
apache2: Syntax error on line 237 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/sites-enabled/000-default: No such file or directory
Action 'start' failed.
The Apache error log may have more information.
I have checked this file on this line and it looks like this:
# Include the virtual host configurations:
Include sites-enabled/
I have removed Apache and re installed it but not sure why it still fails.
As also answered by Qben, the issue was an invalid symlink in the sites-enabled folder. Removing the broken symlink and adding a valid one will fix the issue.
You do not have a default site enabled:
/etc/apache2/sites-enabled/000-default: No such file or directory
site-enabled should contain symlinks to files in site-available and I guess your 000-default symlink does not link to a real file in site-available.
I guess this Ubuntu guide might be of interest for you.
One of the reason may be that you might have some site that is not enabled.To check that
Go to /etc/apache2/sites-enabled
Out of many/some [sitename].conf files , one/some may be crossed
Delete those found crossed
Restart apache server
sudo service apache2 restart.
Hope this has helped you , but may be some other reason too. Thank you.
I'm porting over a Windows httpd.conf file to a linux apache server. I'm pretty much done, but the only error i get is:
* Starting web server apache2 [Tue Feb 07 14:24:34 2012] [warn] The Alias directive in /etc/apache2/httpd.conf at line 449 will probably never match because it overlaps an earlier Alias.
Syntax error on line 461 of /etc/apache2/httpd.conf:
Invalid command 'Script', perhaps misspelled or defined by a module not included in the server configuration
Action 'start' failed.
The Apache error log may have more information.
My httpd.conf file at line 461 is as follows:
ScriptAlias /cgi-bin "/var/www/cgi-bin"
Script PUT /cgi-bin/put.py
Looks like the mod_actions module isn't loaded. This module enables the use of Scripts.
If you activate this module, the error message should disappear.
You can typically activate mod_actions by creating a symlink from the respective mods_available directory like this:
ln -s /etc/apache2/mods-available/actions.load /etc/apache2/mods-enabled/actions.load
The directory structure can be different on your machine, but the principle remains the same: There are available modules and these can be activated by symlinking into the mods_enabled dir.
I am running a server that accepts https requests. I have generated my own certificate. When going to the site in firefox I get the unknown certificate error, but that's fine. This (I think) indicates that port forwarding and such works.
I am trying to use svn with this. When using svn on the server (but using the external ip) it works. Again I get the certificate is unknown, but I don't care.
When using svn on mac OS X I get
SSL negotiation failed: SSL error code -1/1/336032856
I've found several posts on google about this, but they all say it's a bug with openssl version 0.9.8, and that using something higher should fix it.
I am currently using openssl 1.0.0c. I have no idea what's going wrong. I also checked the error log in httpd and nothing comes up.
Any ideas on this would really help.
Thanks
Upgrading from SVN 1.6.15 to 1.6.16 fix this issue for me.
I received the same error message when my Apache configuration was wrong - my ServerName parameter in httpd.conf did not match hostname in the self-signed certificate.
I started getting this error from older subversion clients (Tortoise 1.6.4 i think, and pysvn r1280) when our svn server had its Apache instance upgraded. It went from using OpenSSL 0.9.8n to 1.0.0d.
Tortoise got fixed by upgrading to 1.6.16 (uses OpenSSL 1.0.0d).
Fixing pysvn was a different story. The latest version (r1360) came bac kwith the same error. There didn't seem to be much info around apart from hints that OpenSLL might need upgrading. I tried copying in different versions of OpenSSL (libeay32.dll and ssleay32.dll) and here are the results:
0.9.8j (the existing DLL version, bundled with pysvn r1280) FAIL
0.9.8o (bundled with the latest pysvn, r1360) FAIL
0.9.8r (the latest in the 0.9.8 series) FAIL
1.0.0* (the 1.0 series is not binary compatible with pysvn) FAIL
0.9.8L (nabbed from CollabNet SVN 1.6.9 command line client) SUCCESS!
So whatever they fixed in release L got broken again soon after, or there's something special about CollabNet's OpenSSL binaries.
In my case it started happening after some certificates changes on the server side. I tried deleting the .subversion/ dir, updating openssl, openssh, svn, and nothing...
It got finally fixed when I replaced the url host name with the ip address of that host.
In existing working copies was enough with:
svn switch --relocate http://hostname.com https://ipaddress
Not sure if this is a bug or what, but it seems that the new certificates are not recognized and keeps using the old cached ones for a given host name.
I agree with the earlier answer by Lukas Cenovsky, that setting ServerName in the apache configuration fixes the problem.
In this link http://www.elegosoft.com/files/svn-day-berlin-2011_sperling_subversion-error-messages-demystified.pdf it is said that the error originates from the SSL library.
The full error message(just to enable better google indexing) I receive is:
$ svn ls https://www.OMITTED.dk/svn
svn: E175002: Unable to connect to a repository at URL 'https://www.OMITTED.dk/svn'
svn: E175002: OPTIONS of 'https://www.OMITTED.dk/svn': SSL handshake failed: SSL error code -1/1/336032856 (https://www.OMITTED.dk)
In the file /etc/apache2/sites-available/ssl (debian linux)
I added the ServerName as:
NameVirtualHost *:443
<VirtualHost *:443>
ServerAdmin webmaster#localhost
SSLEngine On
ServerName www.OMITTED.dk
See what happens if you eliminate the SSL problem by adding your generated certificate to your client's trusted certificate store.
One step ahead, my case is a MSWindows Client workstation and a CentOs server with Apache.
Using Tortoise Subversion 1.6.16, I realise that after execute a "svn checkout https://OMITTED.dk/project", I got the same ssl handshake error.
What I did was
update c:\windows\system32\drivers\etc\hosts with "IP_address
OMITTED.dk"
update the entries with the project directory. Edit the
file project/entries and replace the IP_address by OMITTED.dk.
Thus I try the command : svn update path_to_project --non-interactive --trust-server-cert.
Hope will be usefull