Hello all,
I am trying to get SSL working for apache2 (then a proxy, then anyterm)
I am still pretty new to linux in general...
When I /etc/init.d/apache2 restart with the following changes to /etc/apache2/sites-available/default I get:
Restarting web server: apache2[Sat Mar 07 13:03:12 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
... waiting [Sat Mar 07 13:03:13 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
.
I think I might be making an error in the order of my tags but I tried many different configurations: putting namevirutalhost *:443 down between the <VirtualHost> tags i.e. one entry before each set of virtualhosts); I tried <Virtualhost *:80,*:443> (and a dozen variations) but I have to admit I am missing something here. I am just trying to get SSL working.
It seems I'll have to put the file served through 443 in another directory, Will I need to change this line to change the directory, and then just put index.php in there???:
RedirectMatch ^/$ /apache2-default/
I feel I'm missing something base here but I only have a few weeks experience with linux (done ms helpdesk for years) and often lack of exposure just kills me in linux.
THANK YOU!!!
Here's my /etc/apache2/sites-available/default:
Code:
GNU nano 2.0.7 File: /etc/apache2/sites-available/default
NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
SSLEngine on
SSLCertificateFile /etc/apache2/apache.pem
</VirtualHost>