View Full Version : httpd.conf
benkyma
12-10-2007, 06:08 AM
I need to set up a virtual host on my server for a symfony application. The instructions I have for this are to modify httpd.conf to add:
<VirtualHost *:80>
ServerName askeet
DocumentRoot "/home/sfprojects/askeet/web"
DirectoryIndex index.php
Alias /sf /usr/local/lib/php/data/symfony/web/sf
<Directory "/home/sfprojects/askeet/web">
AllowOverride All
</Directory>
</VirtualHost>
Is there a way to access the http.conf file and make these changes, or if not, an alternative method for achieving the same thing?
sjlplat
12-10-2007, 07:58 AM
You cannot access httpd.conf. Hostmonster uses a php.ini file to provide Apache customization to users.
As far as I know, you cannot create your own virtual hosts. Try following these instructions to install Symfony on a shared host:
http://trac.symfony-project.com/wiki/InstallingSymfonyOnSharedHostNoSsh
Depeche
12-10-2007, 02:31 PM
If you have your own web server at home you can do that.
KM-ADMIN
12-16-2007, 02:10 PM
...
Is there a way to access the http.conf file and make these changes, or if not, an alternative method for achieving the same thing?
The httpd.conf configures the Apache server for all users on the shared Hostmonster system(s), and mayhem would result if the Hostmonster administrators let anybody edit it... But:
A .htaccess file can be put into the public_html directory and its sub-directories.
The docs for the Apache 1.3.39 server Hostmonster runs are at: http://httpd.apache.org/docs/1.3/
Most Apache configuration directives will not work from the .htaccess file.
Looking at the virtualhost Directive (http://httpd.apache.org/docs/1.3/mod/core.html#virtualhost), you can see the "Context" field near the top says "server config" which means the VirtualHost directive cannot be in a .htaccess file, only in the httpd.conf which the Hostmonster administrators control.
What will work in .htaccess ??? So far I can verify the following work in Hostmonster user public_html dirs and sub-dirs:
Redirect permanent <from> <to>
AuthType Basic
AuthName <String>
AuthUserFile <File>
AuthGroupFile <File>
Require group <groupname>
and more in the docs where the "Context" field says ".htaccess".
I couldn't get the AuthDigest directives to work in .htaccess .
You should already have a default (empty?) .htaccess file in your public_html directory. (If you're using the "ls" command at the SSH
console, remember the "ls" command needs the "-a" option, i.e. "ls -a", to see "hidden" files that start with a period.)
Hope this helps.
KM-ADMIN
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.