Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSL and 80

Status
Not open for further replies.

JurkMonkey

Programmer
Nov 23, 2004
1,731
CA
Hello,

I'm trying to setup an apache2 server with SSL. I've installed the certificate and enabled Listen 443 and that works fine.

the problem now is that my default Port 80 traffic is not allowed to the websites. How do I configure apache to allow both port 80 and 443 traffic?

Thanks

 
I have both Listen 80 and Listen 443

It turns out I can only log in using https after I installed SSL. How can I make port 80 work with http?

Thanks!

 
What OS are running?
What does your httpd.conf say (please don't show comment lines)?
Are you running a firewall?
Did it ever work right?

D.E.R. Management - IT Project Management Consulting
 
You can't bind to any one port globally in this case or you will get the result you are getting now. You must specify the port in the vhost container something like this:

<VirtualHost *:443>

or

<VirtualHost *.80>

Obviously, you will use the ssl stuff such as turning the engine on in each of the 443 vhosts.

 
This is the error message that I am receiving. I am including the major config files for you guys to look at.

Thanks!


Error Message

Code:
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.

http.d file

Code:
ServerName localhost

/etc/apache2/sites-available/default file

Code:
NameVirtualHost *
<VirtualHost *>
	ServerAdmin webmaster@localhost
	
	DocumentRoot /var/www/
	<Directory />
		Options FollowSymLinks
		AllowOverride all
	</Directory>
	<Directory /var/[URL unfurl="true"]www/>[/URL]
		Options Indexes FollowSymLinks MultiViews
		AllowOverride all
		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 all
		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 all
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

	SSLEngine on
	SSLCertificateFile /etc/apache2/ssl/apache.pem
</VirtualHost>

ports.conf

Code:
Listen 80
Listen 443

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top