GUKPT Posted November 17, 2008 Share Posted November 17, 2008 Hi all.really hope someone can help me here.. I have 3 sites in my vhost site1.com site2.com site3.com when i try my local ip to the server 192.162 etc it loads up site1.com ok with runnin scirpts when i try same thing local i192.168etc/site2.com its loads up fine all html pages an not runnin any scirpts on this 1.. when i try same 192.168etc/site3.com i get forbiddon.i look in the error logs and see options ExecCGI is off in this directory but i know i have it on..site 1 and 3 are runnin the same scirpts and i have set then up the same. does anyone know whats goin on.do i have to put something dif in site3.com to run scirpts aswell and site1.com Quote Link to comment https://forums.phpfreaks.com/topic/133063-virtualhost-issue/ Share on other sites More sharing options...
trq Posted November 17, 2008 Share Posted November 17, 2008 Virtual hosts should have there own document root not inside another virtual hosts document root. Seems you have an odd setup. Can we see the relevent vhost configs? Quote Link to comment https://forums.phpfreaks.com/topic/133063-virtualhost-issue/#findComment-691994 Share on other sites More sharing options...
GUKPT Posted November 17, 2008 Author Share Posted November 17, 2008 # # Virtual Hosts # # If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # <URL:http://httpd.apache.org/docs/2.2/vhosts/> # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # Use name-based virtual hosting. # NameVirtualHost *:80 # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for all requests that do not # match a ServerName or ServerAlias in any <VirtualHost> block. # <VirtualHost *:80> ServerAdmin Admin@site1.com DocumentRoot "C:/wwws/forum" ServerName site1.com ServerAlias www.site1.com <Directory "C:/wwws/forum"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> ScriptAlias /cgi-bin "c:/wwws/forum/Yabb2/cgi-bin/yabb2" <Directory "c:/wwws/forum/Yabb2/cgi-bin/yabb2"> AllowOverride all Options +ExecCGI AddHandler cgi-bin .cgi ,pl Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerAdmin Admin@site2.com DocumentRoot "C:/wwws/forum/site2.com" ServerName site2.com ServerAlias www.site2.com <Directory "c:/wwws/forum/site2.com/"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> </Virtualhost> <VirtualHost *:80> ServerAdmin Admin@site3.com DocumentRoot "C:/wwws/forum/site3.com" ServerName site3.com ServerAlias www.site3.com <Directory "C:/wwws/forum/site3.com"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> ScriptAlias /cgi-bin "c:/wwws/forum/site3.com/Yabb2/cgi-bin/yabb2" <Directory "c:/wwws/forum/site3.com/Yabb2/cgi-bin/yabb2"> AllowOverride all Options +ExecCGI AddHandler cgi-bin .cgi ,pl Order allow,deny Allow from all </Directory> </VirtualHost> Quote Link to comment https://forums.phpfreaks.com/topic/133063-virtualhost-issue/#findComment-692008 Share on other sites More sharing options...
trq Posted November 17, 2008 Share Posted November 17, 2008 Why are your document roots within each other? I'm not 100% sure, but that may cause issues. Quote Link to comment https://forums.phpfreaks.com/topic/133063-virtualhost-issue/#findComment-692010 Share on other sites More sharing options...
GUKPT Posted November 17, 2008 Author Share Posted November 17, 2008 i tryed to keep all sites in wwws/forum/site.com folder...if this was a prob then surly site2.com wouldnt work..but 1 and 2 does work only site3 dont work..just keep gettin the same error Quote Link to comment https://forums.phpfreaks.com/topic/133063-virtualhost-issue/#findComment-692014 Share on other sites More sharing options...
GUKPT Posted November 18, 2008 Author Share Posted November 18, 2008 still no joy.i seem to still be gettin the same error with site3.com (error logs and see options ExecCGI is off in this directory) Just dont understand why site1.com runs scirpts but not site3.com,as you can see they both have options ExecCGI there.. Quote Link to comment https://forums.phpfreaks.com/topic/133063-virtualhost-issue/#findComment-692527 Share on other sites More sharing options...
neogranas Posted November 18, 2008 Share Posted November 18, 2008 You may need to look at an apache module for setting two separate directories for cgi-bin's. mod_cgi perhaps? Quote Link to comment https://forums.phpfreaks.com/topic/133063-virtualhost-issue/#findComment-692714 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.