View previous topic :: View next topic |
Author |
Message |
ecosta Guru
Joined: 09 May 2003 Posts: 477 Location: Brussels,BE
|
Posted: Wed Apr 26, 2006 1:17 pm Post subject: Apache and SSL->File does not exist: /usr/htdocs [SOLVEDi |
|
|
No one ever mentioned /usr/htdocs but for some reason, when I try and use SSL, this is what I get
Code: |
$ lynx https://localhost/index.html
The requested URL /index.html was not found on this server.
|
Log result
==> /var/log/apache2/access_log <==
127.0.0.1 - - [26/Apr/2006:15:01:43 +0200] "GET /index.html HTTP/1.0" 404 208
==> /var/log/apache2/error_log <==
[Wed Apr 26 15:01:43 2006] [error] [client 127.0.0.1] File does not exist: /usr/htdocs
This is a list of what I hope are the relevant config files
apache2-builtin-mods
# grep ^m apache2-builtin-mods
mod_access shared
mod_auth shared
mod_alias shared
mod_vhost-alias shared
mod_log_config shared
mod_env shared
mod_setenvif shared
mod_mime shared
mod_dir shared
mod_so static
41_mod_ssl.default-vhost.conf
# grep -v ^# modules.d/41_mod_ssl.default-vhost.conf
<IfDefine SSL>
<IfDefine SSL_DEFAULT_VHOST>
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile conf/ssl/test.crt
SSLCertificateKeyFile conf/ssl/test.key
SSLCACertificateFile /etc/apache2/ssl/ovh.pem
<Files ~ "\.(cgi|shtml|phtml|php?)$">
SSLOptions +StdEnvVars
</Files>
<IfModule mod_setenvif.c>
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteOptions inherit
</IfModule>
</VirtualHost>
</IfModule>
</IfDefine>
</IfDefine>
test.mserver1.citech.be.conf
# cat /etc/apache2/vhosts.d/test.mserver1.citech.be.conf
NameVirtualHost *:443
<VirtualHost *:443>
ServerName test.mserver1.citech.be
DocumentRoot /var/www/www.mserver1.citech.be/htdocs/test
ErrorLog /var/log/apache2/test.mserver1.citech.be.error_log
CustomLog /var/log/apache2/test.mserver1.citech.be.access_log combined
DirectoryIndex index.html
<Directory /var/www/www.mserver1.citech.be/htdocs/test>
AllowOverride None
Options +Indexes +FollowSymLinks +MultiViews
<IfModule mod_access.c>
Order Deny,Allow
</IfModule>
</Directory>
</VirtualHost>
apache2
# grep -v ^# /etc/conf.d/apache2 | grep ..
APACHE2_OPTS="-D SECURITY -D SSL -D DEFAULT_VHOST -D SSL_DEFAULT_VHOST -D PHP5"
KEEPENV="PATH"
httpd.conf on request to avoid overloading you all with data
files, keys and permissions are in the right place so that shouldn't be the problem.
Oh, one other thing, after doing a massive find / -type f -exec grep -l /usr/htdocs {} \; I found this but can't figure out what it's all about:
Code: |
# strings `which apache2` | grep htdocs
/usr/htdocs
|
Any thoughts, help advice... I'm stuck
Thanks
-Ed _________________ Linux user #201331
A8N-SLI Delux / AMD64 X2 3800+ / 1024 MB RAM / 5 x 250 GB SATA RAID 1/5 / ATI Radeon X700 256MB.
Last edited by ecosta on Wed Apr 26, 2006 3:26 pm; edited 1 time in total |
|
Back to top |
|
|
Maedhros Bodhisattva
Joined: 14 Apr 2004 Posts: 5511 Location: Durham, UK
|
Posted: Wed Apr 26, 2006 2:04 pm Post subject: |
|
|
Moved from Other Things Gentoo to Networking & Security. _________________ No-one's more important than the earthworm. |
|
Back to top |
|
|
ecosta Guru
Joined: 09 May 2003 Posts: 477 Location: Brussels,BE
|
Posted: Wed Apr 26, 2006 3:26 pm Post subject: |
|
|
I can't say I solved it but I found a way arround... this is what I did if it can help anybody but a sollution to this odd problem would be nice.
After fully reinstalling and using original config files, I still had the problem so I got rid of SSL_DEFAULT_VHOST and put all my SSL configs in the vhost.
changed a few parameters in httpd.conf and the modules
create a key and certificat
Code: |
# openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
|
made a basic vhost file such as:
NameVirtualHost *:443
<VirtualHost *:443>
DocumentRoot "/var/www/mserver1.citech.be/htdocs/443"
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/apache2/ssl/mycert.pem
SSLCertificateKeyFile /etc/apache2/ssl/mycert.pem
<Directory "/var/www/mserver1.citech.be/htdocs/443>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule peruser.c>
ServerEnvironment apache apache
MinSpareProcessors 4
MaxProcessors 20
</IfModule>
</VirtualHost>
Shazam... it works... which leads me to beleive I got something very wrong in my ssl config for the SSL_DEFAULT_VHOST.
Oh well, it works for now _________________ Linux user #201331
A8N-SLI Delux / AMD64 X2 3800+ / 1024 MB RAM / 5 x 250 GB SATA RAID 1/5 / ATI Radeon X700 256MB. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|