Guest tcreek Posted February 25, 2003 Report Share Posted February 25, 2003 Anybody know of a site where I can find a quck and easy instructions on setting a virtua host up on Apache/MDK 9?? Thanks Quote Link to comment Share on other sites More sharing options...
Guest tcreek Posted February 25, 2003 Report Share Posted February 25, 2003 Or even give me some tips. I want another web site on the same IP. I went to LinuxConf to setup Apache and click on Virtual host to set up another web/domain. When I try the access that site from a browser I get "You don't have permission to access / on this server." However the site is not located at / I make a new directory in /var/www Thanks, Trent Quote Link to comment Share on other sites More sharing options...
paul Posted February 25, 2003 Report Share Posted February 25, 2003 the default install of apache uses /var/www so it should have been created in /etc/http/conf/vhost/Vhost.conf you will se how virtual hosting works, its pretty well documented. You created /var/www ? it should already exist after apache installation. "You don't have permission to access / on this server." However the site is not located at / I make a new directory in /var/www you're right ... the webroot is /var/www/html but apache refers to it as / because it is the webroot (read: the apache root directory) Quote Link to comment Share on other sites More sharing options...
Guest tcreek Posted February 26, 2003 Report Share Posted February 26, 2003 I set the virtual web site at /var/www/calandria And set it for the default document in the Apache setup in LinuxConf. So you are saying I need to set the virtual site in /etc/http/conf/vhost/Vhost.conf? Quote Link to comment Share on other sites More sharing options...
Guest tcreek Posted February 26, 2003 Report Share Posted February 26, 2003 I looked and I dont have this directory. I guess I need to look for the Vhost.conf file /etc/http/conf/vhost/ Trent Quote Link to comment Share on other sites More sharing options...
paul Posted February 26, 2003 Report Share Posted February 26, 2003 [paul@morpheus paul]$ ls /etc/httpd/conf/vhosts/ DynamicVhosts.conf Vhosts.conf VirtualHomePages.conf [paul@morpheus paul]$ [paul@morpheus paul]$ cat /etc/httpd/conf/vhost ~~~~~ I've shortened this to show only the good bits ~~~~ NameVirtualHost 202.27.218.97 <VirtualHost 202.27.218.97> DocumentRoot /var/www/html/loudas.com ServerName loudas.com ServerAlias www.loudas.com CustomLog logs/loudas.com-access_log combined </VirtualHost> also you might need to look at the common file [paul@morpheus paul]$ cat /etc/httpd/conf/commonhttpd.conf ~~~~~~~ this is also shortened for the sake of this post ~~~~~ <Directory /var/www/html/loudas.com> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> if you change the default directory (which you have to /var/www/calandria ) then you will need to add something like the above to your commonhttpd.conf file Quote Link to comment Share on other sites More sharing options...
Guest tcreek Posted February 26, 2003 Report Share Posted February 26, 2003 This is what I got so far: Vhosts.confs ################# Named VirtualHosts NameVirtualHost 66.25.242.26 <VirtualHost 66.25.242.26> ServerName calandria.dynu.com #ServerPath /domain ServerAlias www.calandria.com DocumentRoot /var/www/calandria </VirtualHost> commonhttpd.conf <Directory /var/www/calandria> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> I restarted Apache and I still get the result as I indicated Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted February 26, 2003 Report Share Posted February 26, 2003 Make sure that the directory /var/www/calandria has the same permissions and ownership as the other site's directory that works. That's all I can think of. I didn't want to go through the hassle of configuring everything for /var/www so I changed my Apache root to /home/*/html/ (but I'm not saying you have to) And, not to insult your intelligence or anything, but if there is not an index (index.html, index.htm, etc) file in there you'll get that error. Quote Link to comment Share on other sites More sharing options...
paul Posted February 26, 2003 Report Share Posted February 26, 2003 yep Steve is right for security purposes your /var/www/calandria should be owned by apache, and 755'ed chown -R apache.apache /var/www/calandria chmod -R 755 /var/www/calandria but for ease of use (no one listen this is a secret :#: ) I have chown -R paul.paul /var/www/html/loudas.com that way I can work without having to su Quote Link to comment Share on other sites More sharing options...
Guest tcreek Posted February 26, 2003 Report Share Posted February 26, 2003 Everything what you suggest had already been done and a index.htm file is indeed there. Trent Quote Link to comment Share on other sites More sharing options...
paul Posted February 26, 2003 Report Share Posted February 26, 2003 then it works??? Quote Link to comment Share on other sites More sharing options...
Guest tcreek Posted February 26, 2003 Report Share Posted February 26, 2003 I did this..... [root@netservisity calandria]# chown -R apache.apache /var/www/calandria [root@netservisity calandria]# chmod -R 755 /var/www/calandria and... same result Trent Quote Link to comment Share on other sites More sharing options...
Guest tcreek Posted February 26, 2003 Report Share Posted February 26, 2003 Nope..It don't work :-( Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted February 26, 2003 Report Share Posted February 26, 2003 I have dumb question/suggestion (so dumb it may work) but are you sure this <Directory /var/www/calandria> is not supposed to be this? <Directory /var/www/html/calandria> That's the default apache location. Quote Link to comment Share on other sites More sharing options...
Guest tcreek Posted February 26, 2003 Report Share Posted February 26, 2003 I don't beleive so. In the past I have set up new sites on the www directory . e.g. /var/www/trent then using the domain type in www.domain.com/trent it would come up fine. But I will try this Quote Link to comment 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.
Note: Your post will require moderator approval before it will be visible.