Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-19-2012, 12:25 PM   PM User | #1
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,613
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
URL rewriting not working on localhost

hmm, I can’t seem to get pretty URLs working on my local server, I just get “404” errors. The default httpd.conf has this:
Code:
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>
and then I have a user specific config file where I have this:
Code:
Options +Includes
<Directory "/Users/[user name]/Sites/">
    Options Indexes MultiViews +Includes
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

NameVirtualHost *:80
<VirtualHost *:80>
    DocumentRoot "/Users/[user name]/Sites/example"
    ServerName example.dev
</VirtualHost>
…
(more virtual host names here)
…
This Sites directory is basically the web root of my local server. In that I have different sub directories for all my testing sites. These sites have .htaccess files in their root directories where the rewriting is defined, among other things. It is obviously rewriting and the error log has no errors except the 404s. What’s my problem?
__________________
Don’t click this link!
VIPStephan is online now   Reply With Quote
Old 04-19-2012, 04:00 PM   PM User | #2
tipsmail7
New to the CF scene

 
Join Date: Apr 2012
Posts: 4
Thanks: 1
Thanked 1 Time in 1 Post
tipsmail7 is an unknown quantity at this point
The line "AllowOverride None" would prevent Apache to read .htaccess

http://httpd.apache.org/docs/2.0/mod...#allowoverride
tipsmail7 is offline   Reply With Quote
Old 04-19-2012, 10:42 PM   PM User | #3
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,613
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
This is definitely not the problem because the .htaccess file is being read; as I said, it is rewriting the URL, it’s just not showing the page. If I change AllowOverride to All I’m getting error 403 instead of 404 – not much achieved here.

Any other possibilities?

Edit: I’m sorry, I was (partly) wrong. I do indeed have to change AllowOverride to All but I also had to add FollowSymLinks to the Options rule. It’s working now, woohoo!
__________________
Don’t click this link!

Last edited by VIPStephan; 04-19-2012 at 11:31 PM..
VIPStephan is online now   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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


All times are GMT +1. The time now is 12:45 AM.


Advertisement
Log in to turn off these ads.