Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache Virtual Hosts |
|
Author |
|
RystNET
Joined: 04 Jun 2010 Posts: 2 Location: Wisconsin, USA
|
Posted: Fri 04 Jun '10 3:17 Post subject: Apache Virtual Hosts |
|
|
Hey Everyone,
I'm in need of some help. I have googled and looked at guides and nothing is currently working for me. I'm not exactly sure how I had it set before and now that I'm running a new version of Windows (Windows 7, I had to format) I lost my configuration files. I'm currently receiving 403 errors when I try to set up my virtual hosts and this is what I'm trying to do.
- I have my domain, www.ryst.net which resides in the base of drive E:/ which works when httpd-vhosts is disabled.
(Ryst.NET -> E:/index.php)
- I have my subdomains with-in folders in E:/, so for example spirit.ryst.net actually exists in E:/spirit
(spirit.ryst.net -> E:/spirit/index.php)
So, how would I go about setting this up, without running into 403 errors? What should I edit/add in httpd.conf and httpd-vhosts.conf? I really appreciate any help I get, I'm just having one heck of a time at the moment and would love to get my virtual hosting setup again for the people that use my web server. Just to clarify nothing HTTP exists outside of drive E: my main website and all sub-websites are within E:
Thanks!
Current httpd-vhosts.conf:
Code: | NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.ryst.net
ServerAlias ryst.net *.ryst.net
DocumentRoot
</VirtualHost>
<VirtualHost *:80>
ServerName spirit.ryst.net
ServerAlias spirit.ryst.net *.spirit.ryst.net
DocumentRoot /spirit
</VirtualHost>
<VirtualHost *:80>
ServerName bk.ryst.net
ServerAlias bk.ryst.net *.bk.ryst.net
DocumentRoot /bk
</VirtualHost> |
|
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Fri 04 Jun '10 4:48 Post subject: |
|
|
1. First vhost in list has empty DocumentRoot
2. For every DocumentRoot there needs to be a corresponding <Directory /whatever> container.*
3. If Apache is not on the E drive, the DocumentRoots/Directory containers will have to be preceded by E:
DocumentRoot E:/
DocumentRoot E:/spirit
DocumentRoot E:/bk
4. If Apache is indeed on the E drive, well there's a security issue here because you have to allow the entire E drive to have www.ryst.net work, which also allows EVERYTHING above E:\ being accessible.
I could go to say
http://www.ryst.net/Apache2/conf/httpd.conf and read your entire configuration if Apache were installed at E:\Apache2
Best practices would suggest getting it above E root regardless ... to say E:\ryst
If you want the option to go to http://www.ryst.net/spirit as a secondary way to the spirit site ... there's always Alias.
* In reality with this current setup, there is only need for the one Directory container since everything below it in the tree will have same access. This makes for simpler configuration, but put nothing on the E drive that you do not want people getting their hands on. |
|
Back to top |
|
RystNET
Joined: 04 Jun 2010 Posts: 2 Location: Wisconsin, USA
|
Posted: Sun 06 Jun '10 6:01 Post subject: |
|
|
Thanks for the response. I wanted to let you know that I figured out. I was editing the vhosts file in the wrong directory. Somehow an old Apache directory got left in my C: drive. Well needless to say, I got it working again.
Thanks for helping me out though! It's much appreciated. I knew it was probably something simple and it was. *sigh* lol.
Yeah. There are no program/delicate documents in drive E:. It's strictly web files. Anything that I don't want seen publicly is in my C: drive. |
|
Back to top |
|
|
|
|
|
|