Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12th July 2008, 01:30 AM
WhiteFeather Offline
Registered User
 
Join Date: May 2008
Posts: 16
Apache VHosts reroutes URL or gives 403 Forbidden

Hi all,

I got Apache working with an IP based domain, and it seemed to work fine by resolving remotely and displaying my hand rolled index.html file.

However, when I tried to create a virtual domain, browser attempts to reach EITHER domain routed to some Fedora test page... I'm not sure even where on my machine this page is even located, but customized index.html files in both domains' htdocs folders are being ignored.

Indeed, if I type in http://domain.com/index.html for either domain, I get a 403 forbidden error. I even tried a couple temporary work-arounds by chmodding both indexes 777 and chowning them apache:apache. No such luck.

I feel sure this is probably a common problem, but I'm not sure I have enough knowledge to have described it well. Does this sound familiar to anyone?

Thanks for your time!
Tony
Reply With Quote
  #2  
Old 12th July 2008, 04:39 AM
marcrblevins's Avatar
marcrblevins Offline
Registered User
 
Join Date: Jun 2006
Location: Texas
Age: 42
Posts: 4,168
Should not use 777.
Did you store your files in /var/www/html?
Reply With Quote
  #3  
Old 12th July 2008, 05:17 AM
WhiteFeather Offline
Registered User
 
Join Date: May 2008
Posts: 16
I know I shouldn't use 777. I was trying to point out that I set various permissions in order to try to circumvent the problem. In other words, I tried setting both the enclosing directory and the index.html files to 755 and 777 with "apache" as the owner and group in order to resolve the problem, but to no avail.

The default domain files are located at /var/www/html - or whatever the defulat directory is. I put the virtual host at /var/vhosts/domain.com/htdocs

Unfortunately, both of those domains now display the Fedora test page, and neither of them display their respective custom index.html files wheh you go to http://domain.com or http://virtualdomain.com.

Also, if you try to go to http://domain.com/index.html or http://virtualdomain.com/index.html you get the 403 Forbidden error.

Thanks!
Reply With Quote
  #4  
Old 12th July 2008, 05:41 AM
marcrblevins's Avatar
marcrblevins Offline
Registered User
 
Join Date: Jun 2006
Location: Texas
Age: 42
Posts: 4,168
Can you go over this link:
http://httpd.apache.org/docs/2.2/vhosts/
Maybe you missed some steps.
Reply With Quote
  #5  
Old 19th July 2008, 04:16 AM
WhiteFeather Offline
Registered User
 
Join Date: May 2008
Posts: 16
First, I had to set selinux = disabled in /etc/selinux/config

Then, make sure that every enclosing directory of the various virtual hosts has the permissions correctly set by "chmod o+x directoryName"

That fixed the problems.
Reply With Quote
  #6  
Old 19th July 2008, 09:38 AM
nffedora Offline
Registered User
 
Join Date: Jul 2008
Posts: 2
Hi,

I have been having basically the same problem...

I have selinux disabled.
I have iptables not running (which I think means the firewall is disabled, that and the fact that I can see the fedora apache test page on another computer on my network.)
I have the machine set up with multiple ips on a local network.
I have fedora 9.

I have what I think is a basic default yum install of apache2 and php. The php works fine. I tested it by creating a phpinfo file in the default html folder.

My problem is that when I created (in the httpd.conf file) three virtual hosts they all "work" in the fact that when I go to the ip address in my browser and see the apache test page. The problem is that when I create a folder with mkdir or a simple file with vi I get either a file not found (with files) or a 403 forbidden (with folders) I tried chmod 777 the folders and I still get the same error. I have also tried using <directory /theDirectoryInQuestion> with allow from all in it.


So... what should I do to fix this? Any ideas would be much appreciated.


Thanks,

nffedora
Reply With Quote
  #7  
Old 19th July 2008, 10:14 AM
nffedora Offline
Registered User
 
Join Date: Jul 2008
Posts: 2
So i think i have the problem solved.... It may have been an issue with that <Directory> tag I added quotes to the location, reloaded, and it seemed to work.... now I have to get subversion working... anyone have any ideas why the page is still coming up as apache and not the repo? remember basic yum subversion and mod_dav_svn install...


Thanks,


nff
Reply With Quote
Reply

Tags
403, apache, forbidden, reroutes, url, vhosts

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
apache vhosts no longer working lanrat Servers & Networking 23 3rd March 2008 03:49 AM
Apache - Subdirectories are forbidden Themis Servers & Networking 26 26th August 2007 02:31 AM
Apache Forbidden... smarttart62 Servers & Networking 15 16th January 2007 01:57 AM
Apache > 403 Forbidden dmode Servers & Networking 6 1st March 2005 01:11 PM


Current GMT-time: 22:37 (Tuesday, 18-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat