Author |
|
OldManRiver
Joined: 21 Jun 2006 Posts: 21
|
Posted: Wed 21 Jun '06 20:18 Post subject: Virtual Hosts |
|
|
Working on several sites and have a PHP problem in code on one.
Been FTP'ing to ISP and running but then cannot see PHP errors.
Need to mirror ISP setup on my localhost so I can debug. Error is a redirect error that is causing either blank pages (sometimes) or staying in current page with no changes (other times).
Added the following VHost code to apache, which is syntax free, but not running: Code: | <VirtualHost *:80>
ServerName "stovall.home.com"
DocumentRoot "E:/Mypath/Stovall"
ServerAdmin "admin@stovallhome.com"
ErrorLog "logs/stovall-error_log"
CustomLog logs/stovall-access_log common
</VirtualHost> |
Calling file is .shtml so have the line: Code: | DirectoryIndex index.html index.html.var index.shtml |
This is my first try at Virtual Host so could use some help here!
Thanks!
OMR |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Wed 21 Jun '06 20:51 Post subject: |
|
|
Not clear to me what does not work for you.
Our vhost config looks like:
NameVirtualHost *
<VirtualHost *>
ServerName just_a_name
DocumentRoot f:/web/unknown
</VirtualHost>
<VirtualHost *>
ServerName www.apachelounge.com
ServerAlias apachelounge.com
DocumentRoot f:/web/al
</VirtualHost>
etc. etc.
note:
The first VirtualHost section is used for all requests that do not match a ServerName or ServerAlias in any <VirtualHost> block
Steffen |
|
Back to top |
|
OldManRiver
Joined: 21 Jun 2006 Posts: 21
|
Posted: Thu 22 Jun '06 0:59 Post subject: |
|
|
Steffen wrote: | Not clear to me what does not work for you.
Our vhost config looks like:
NameVirtualHost *
<VirtualHost *>
ServerName just_a_name
DocumentRoot f:/web/unknown
</VirtualHost>
<VirtualHost *>
ServerName www.apachelounge.com
ServerAlias apachelounge.com
DocumentRoot f:/web/al
</VirtualHost>
etc. etc.
note:
The first VirtualHost section is used for all requests that do not match a ServerName or ServerAlias in any <VirtualHost> block
Steffen |
Thanks for the reply. Let me see if I can explain better. I have these projects organized like:e:\projects\project1
e:\projects\project2
e:\projects\project3
e:\projects\project4
e:\projects\project5 I need to be able to do either:
localhost/project1/
or
new.project1.com and have Apache recognize that just like:http://www.project1.com
or
/apache/htdocs/project1 What I entered does not get that done, not even sure it works, don't know how to adequately test it and do not know what else to enter in the .conf file to get to the point I need. Maybe all I need is a ServerAlias to the right set of directories. I have a bunch of Directory defs like:
Code: | <Directory "E:/Projects/Project1">
Options All
Allow from All
Order Allow,Deny
</Directory> | but don't even know what these do.
Hope this is not more confusing.
OMR |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
|
Back to top |
|
OldManRiver
Joined: 21 Jun 2006 Posts: 21
|
Posted: Thu 22 Jun '06 20:14 Post subject: Tried but error |
|
|
Tried the items in that post and now getting 403 errors, even on localhost.
Posted my problem there.
OMR |
|
Back to top |
|
Jorge
Joined: 12 Mar 2006 Posts: 376 Location: Belgium
|
Posted: Fri 23 Jun '06 10:45 Post subject: |
|
|
Steffen wrote: | Not clear to me what does not work for you.
Our vhost config looks like:
NameVirtualHost *
<VirtualHost *>
ServerName just_a_name
DocumentRoot f:/web/unknown
</VirtualHost>
<VirtualHost *>
ServerName www.apachelounge.com
ServerAlias apachelounge.com
DocumentRoot f:/web/al
</VirtualHost>
etc. etc.
note:
The first VirtualHost section is used for all requests that do not match a ServerName or ServerAlias in any <VirtualHost> block
Steffen |
If you use <VirtualHost _default_:80> stuff here </VirtualHost>
Apache will use this one when there is no-other available beat using the unkown block. |
|
Back to top |
|
YoDude9999
Joined: 23 Jun 2006 Posts: 3
|
Posted: Fri 23 Jun '06 18:47 Post subject: |
|
|
Quote: |
jorge
<Directory "E:/Projects/Project1">
Options All
Allow from All
Order Allow,Deny
</Directory> |
You may want to consider changing to:
<Directory "E:/Projects/Project1">
Options All
Order Allow,Deny
Allow from All
</Directory> |
|
Back to top |
|
OldManRiver
Joined: 21 Jun 2006 Posts: 21
|
|
Back to top |
|