logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Forcing Apache to listen only on port 443, got issues
Author
kamild1996



Joined: 24 May 2014
Posts: 1

PostPosted: Sat 24 May '14 19:01    Post subject: Forcing Apache to listen only on port 443, got issues Reply with quote

I'm running the newest Debian Wheezy and I'm configuring an Apache2 server with phpMyAdmin running, not more. I have installed a self-signed certificate by:

    * Removing default file in /etc/apache2/sites-available
    * Modifying default-ssl file to add paths for certificate and certificate key
    * Renaming default-ssl to default
    * service apache2 restart

Certificate is indeed working but not quite as I have expected.
My goal is to shut down port 80 for Apache entirely and to make the browser use HTTPS automatically for any sites, including phpMyAdmin. The first problem is that I have to manually add https:// in URL to be able to open a default site from /var/www - I expected it to redirect automatically to HTTPS. The second one is phpMyAdmin not working really well with SSL. When I open http://10.0.0.8/phpmyadmin in my browser, site opens without SSL certificate and after I try to log in, it redirects me to http://10.0.0.8/phpmyadmin/index.php which results in the browser showing "Connection Refused". After opening the site with https:// instead, everything is working perfectly.
What have I done for now is I commented two first lines in ports.conf to turn off listening in port 80. Also I tried to force phpMyAdmin to use SSL by adding $cfg['ForceSSL'] = true; in config.inc.php and making a .htaccess file to redirect the user to SSL site with
Code:
Redirect permanent /phpmyadmin https://10.0.0.8/phpmyadmin

How can I achieve that? I'm looking for a method that is simple to memorize. Thanks for any advance.

[list]
Apache version: 2.2.22
phpMyAdmin version: 3.4.11.1deb2
Operating system: Debian Wheezy 7.4.0 x64
Log files: Not sure where to look for them, if you need any, tell me
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 26 May '14 10:47    Post subject: Reply with quote

What is your problem? You can still reach your server on port 80 or what?
Back to top


Reply to topic   Topic: Forcing Apache to listen only on port 443, got issues View previous topic :: View next topic
Post new topic   Forum Index -> Apache