![]() |
Can't get SSL working on Apache2.2
I'm running Apache 2.2 on Debian 6.
I'm trying to get SSL up and running on my development server (i.e. it's only available on my home LAN), but no dice! Interestingly, there are various tutorials out there, many of which seem to be at best slightly incongruent and at worst downright conflicting! Mostly, I've been following the tutorial here: http://www.debianadmin.com/install-a...bian-etch.html So here's how I get on with it, bit-by-bit. At each stage I am carefully and slowly following the instructions: 1) Install PHP5 support for apache2 in debian etch. Already done. No need to re-do.. 2) Generate A certificate. Done. No problems. 3) Enable SSL Support. Done. No problems. 4) Configuring SSL Certificate to Virtual Hosts in Apache2. Houston, we have a problem! Yup, this is where it all starts to go horribly wrong. Firstly, there is no line NameVirtualHost * in /etc/apache2/sites-available/default. (See the instructions that I've been using to understand my confusion here).So, I put NameVirtualHost *:80 and NameVirtualHost *:443 into /etc/apache2/sites-available/default anyway, and then follow the remaining steps.when I try to restart the web server, I get the following error: Reloading web server config: apache2[Fri Nov 30 13:54:38 2012] [warn] NameVirtualHost *:443 has no VirtualHostsOf course, the error goes away when I remove the new lines of code in /etc/apache2/sites-available/default, but SSL doesn't work either ... Any ideas? I'm stumped ... |
The first line in
/etc/apache2/sites-available/default <VirtualHost *:80>on line 9 of nano /etc/apache2/ports.conf NameVirtualHost *:80That is where you control the virtual host ports. I change mine for port forwarding. I know SSL only needs 443. Read through http://www.debian-administration.org/articles/349 I know there is an interactive module for the terminal to create SSL certificates. i have never used it though. I'm running Debian 6.06 http://www.linuxquestions.org/questi...-linux-596151/ http://www.thegeekstuff.com/2009/07/...-csr-crt-file/ |
Perfect! That works nicely.
I was confused because the configuration of the virtual host ports is split across /etc/apache2/ports.conf and /etc/apache2/sites-available/default Do you know why this is? Why not just have it all in the one file? (I've stuck the NameVirtualHost definition for port 443 into the ports file and not the 'default' file). Also, and as an aside, why won't AllowOverride in .htaccess work with SSL? (I get a 500 error if I have AllowOverride on the webserver's ssl directory). |
Don't quote me on it, but the sites-available folder is for different sites. Apache uses virtual hosting to host multiple sites on a single web-server.
For the SSL and AllowOverride isue, check out this https://help.ubuntu.com/community/En...eHtaccessFiles From your previous post I assume you are using Debian, but Ubuntu is based off of it so it should be close. |
Quote:
Code:
NameVirtualHost *:80 |
This is way off topic, but I just now realized I typed
Quote:
|
| All times are GMT +1. The time now is 02:09 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.