DeveloperSide.NET Forums
July 13, 2020, 04:32:38 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Would I need to configure httpd.config file or vhost file.  (Read 7299 times)
0 Members and 1 Guest are viewing this topic.
Wilz
Member
*
Posts: 26


View Profile
« on: July 17, 2007, 02:42:19 PM »

Hello would I need to configure, either the httpd.config file or the vhost file, in order for the htaccess file to work on my server. At this point my website script needs the htaccess file to be turned on for my website to be search engine friendly. But when I turn the .htaccess file on, my website pages won't display. If I need to configure any blocks in my httpd, or vhost files could you please explain, what I would need to put in the files.
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: July 17, 2007, 03:13:50 PM »

If you place this under httpd.conf

AccessFileName .htaccess

<Files ~ "^\.htaccess$">
   order allow,deny
   deny from all
</Files>

And change...

<Directory "/www/webroot">
    Options Indexes FollowSymLinks
    AllowOverride None

To this...

<Directory "/www/webroot">
    Options Indexes FollowSymLinks
    AllowOverride All

It will turn .htaccess on for everything that exists under \www\webroot
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Wilz
Member
*
Posts: 26


View Profile
« Reply #2 on: July 18, 2007, 01:23:48 AM »

Hi, thanks for the fast reply but I forgot to mention that I have a few websites going on my server and so I have configure my server for vhost. Now I'm just wondering where to put the first block that is in your reply because I only have one website that requires .htaccess and also, I will still need to change the directives in httpd.config.
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #3 on: July 18, 2007, 01:30:13 AM »

Then place it under the VH block, and edit the AllowOverride in the dir block of the VH.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Wilz
Member
*
Posts: 26


View Profile
« Reply #4 on: July 18, 2007, 04:06:21 AM »

Hi, ok this is what I done in my vhost file.

<VirtualHost *:80>
    ServerAdmin admin@gamesgalore.servegame.org
    DocumentRoot /www/webroot/arcade
    ServerName gamesgalore.servegame.org
    ErrorLog logs/arcade-error_log
    CustomLog logs/arcade-access_log common
    <Directory "/www/webroot/arcade">
         Options Indexes FollowSymlinks
         AllowOverride All
         Order allow,deny
         Allow from all
    </Directory>
</VirtualHost>
AccessFileName .htaccess

<Files ~ "^\.htaccess$">
   order allow,deny
   deny from all
</Files>

I'm not too sure if it's right because my website is still not displaying. I've also try to put the htaccess block between the directory and virtualhost closing tags.
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #5 on: July 18, 2007, 03:11:39 PM »

Looks fine to me.

You do have a ".htaccess" file under /www/webroot/arcade/?

Have you checked Apache's error.log ?
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!