Showing posts with label Apache. Show all posts
Showing posts with label Apache. Show all posts

Wednesday, 30 December 2009

It Works! No It Doesn't!

Not sure why this is but in Apache 2.2, I had "NameVirtualHost *:80" in the httpd-vhosts.conf file. This was seemingly randomly making the virtualhosts point through to the htdocs root. Updating this to "NameVirtualHost localhost:80" has fixed the issue.

Not sure what the cause is, just glad to see the back of it. Retweet this button on every post blogger

Monday, 21 December 2009

Restart Apache Server In Mac OSX

Depending on the location of the apachectl file the following syntax will restart Apache from within terminal:

sudo /Applications/MAMP/Library/bin/apachectl restart Retweet this button on every post blogger

Monday, 7 December 2009

Getting Apache RewriteRule to work

No intro or background, to get the RewriteRule to work in htaccess you need to activate it. This is specifically for Apache and not ISAPI rewrite on IIS.
  1. Open httpd.conf
  2. Look for MULTIPLE occurances of AllowOverride None
  3. Change to AllowOverride All
  4. Un comment this line #LoadModule rewrite_module modules/mod_rewrite.so
  5. Save & restart the apache server
Couple of note worthy points:
  1. Apache recommend not using htaccess for peformance reasons. There are other methods for nice urls.
  2. This is a Dev environment. I've not check out if the above has any security issues, for live servers.
Retweet this button on every post blogger

Friday, 21 August 2009

Disable Directory Browsing in Apache

Open the config file and change this line:
  • Options Indexes FollowSymLinks
To this:
  • Options FollowSymLinks
Retweet this button on every post blogger
 
Bookmark and Share