LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-24-2011, 05:25 PM   #1
jsp_1983
LQ Newbie
 
Registered: Dec 2010
Posts: 29

Rep: Reputation: 0
Apache forcing HTTPS?


I can find lots of help on how to force HTTPS with Apache, but I have a problem with the opposite - I want to stop it from forcing HTTPS.

I'm running Webmin/ Virtualmin on CentOS5. Some of my virtual hosts are accessible via http, some of them aren't. If I try them with https, however, they work fine. I can't see anything obvious in the httpd.conf file, so I'm just wondering how I can start to troubleshoot this problem? I tried deleting one of the virtual hosts via Virtualmin and implementing the account from scratch, but it makes no difference.
 
Old 03-24-2011, 05:34 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
what does the virtual host config actually say in the httpd.conf? what does the error_log / access_log say?
 
Old 03-24-2011, 06:13 PM   #3
jsp_1983
LQ Newbie
 
Registered: Dec 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
what does the virtual host config actually say in the httpd.conf? what does the error_log / access_log say?
Access_log just has GET requests from my IP address.

error_log says this:

Code:
[Thu Mar 24 14:56:38 2011] [error] [client 78.xx.xx.1] access to /var/www/html/phpmyadmin failed, reason: SSL connection required
[Thu Mar 24 14:59:15 2011] [error] [client 78.xx.xx.1] Directory index forbidden by Options directive: /home/holiday-ideas/public_html/
[Thu Mar 24 15:03:01 2011] [error] [client 207.241.236.47] File does not exist: /home/holiday-ideas/public_html/robots.txt
[Thu Mar 24 15:04:17 2011] [error] [client 78.xx.xx.1] Directory index forbidden by Options directive: /home/holiday-ideas/public_html/
[Thu Mar 24 15:15:16 2011] [error] [client 78.xx.xx.1] access to /var/www/html/phpmyadmin failed, reason: SSL connection required
[Thu Mar 24 15:15:20 2011] [error] [client 78.xx.xx.1] Directory index forbidden by Options directive: /home/holiday-ideas/public_html/
[Thu Mar 24 15:15:58 2011] [error] [client 78.xx.xx.1] Directory index forbidden by Options directive: /home/holiday-ideas/public_html/
[Thu Mar 24 15:16:05 2011] [error] [client 78.xx.xx.1] access to /var/www/html/phpmyadmin failed, reason: SSL connection required
And this is the virtual host section of my httpd.conf file:

Code:
<VirtualHost 178.238.130.240:80>
SuexecUserGroup "#500" "#500"
ServerName holiday-ideas.org.uk
ServerAlias www.holiday-ideas.org.uk
ServerAlias webmail.holiday-ideas.org.uk
ServerAlias admin.holiday-ideas.org.uk
DocumentRoot /home/holiday-ideas/public_html
ErrorLog /var/log/virtualmin/holiday-ideas.org.uk_error_log
CustomLog /var/log/virtualmin/holiday-ideas.org.uk_access_log combined
ScriptAlias /cgi-bin/ /home/holiday-ideas/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/holiday-ideas/public_html>
Options -Indexes +IncludesNOEXEC +FollowSymLinks +ExecCGI
allow from all
AllowOverride All
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
FCGIWrapper /home/holiday-ideas/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/holiday-ideas/fcgi-bin/php5.fcgi .php5
</Directory>
<Directory /home/holiday-ideas/cgi-bin>
allow from all
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.holiday-ideas.org.uk
RewriteRule ^(.*) https://holiday-ideas.org.uk:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.holiday-ideas.org.uk
RewriteRule ^(.*) https://holiday-ideas.org.uk:10000/ [R]
RemoveHandler .php
RemoveHandler .php5
IPCCommTimeout 31
</VirtualHost>
 
Old 03-24-2011, 06:20 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
OK, so the error log is saying there's no index file and won't give you a listing. What are you expecting to happen when you do what? the errors I get hitting the main server name fit inline with the errors on the back end, obviously I've no idea what files actually do or don't exist though.

As for the redirections (and I'm not clear what the main issue is here TBH) then you have those redirects in place doing a redirect.... If you want them to work without https then you'd normally just have a suitable name based virtual host definition seperately from that one

Last edited by acid_kewpie; 03-24-2011 at 06:22 PM.
 
Old 03-24-2011, 06:42 PM   #5
jsp_1983
LQ Newbie
 
Registered: Dec 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Okay, for example, if I hit /phpmyadmin, it gives me the "You don't have permission to access /phpmyadmin on this server." error.

If I just try a random, non-existent directory, like /xyz, I get the "The requested URL /xyz was not found on this server." error.

So I've just made an HTML file in the root, which I can now access. The problem that I thought was with Apache might be with PHPMyAdmin, which is what I was originally trying to access. I suspect there's something in the settings of PHPMyAdmin that I need to look at.

Thanks for helping, anyway.
 
Old 03-24-2011, 07:33 PM   #6
jsp_1983
LQ Newbie
 
Registered: Dec 2010
Posts: 29

Original Poster
Rep: Reputation: 0
How strange... I changed the directory name from 'phpmyadmin' to 'dbadmin' and now I can access it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Apache forcing a webpage to users slomok Linux - Newbie 30 11-29-2010 04:07 PM
Forcing HTTPS in Nagios on Debian using RewriteRule. MheAd Linux - Security 5 04-15-2010 05:06 PM
Redirect https apache requests to folder not in apache root bax Linux - Enterprise 4 04-12-2010 02:16 PM
forcing traffic through certain route(forcing source ip) taltman Linux - Networking 1 12-26-2007 02:07 PM
forcing https redirect results in forbidden? sneakyimp Linux - Software 11 10-22-2007 04:11 AM


All times are GMT -5. The time now is 04:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration