logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: 403 Error on Virtual host
Author
redneckradioman



Joined: 08 Nov 2013
Posts: 9
Location: Houston Texas

PostPosted: Thu 02 Jan '14 21:28    Post subject: 403 Error on Virtual host Reply with quote

Hey guys I'm using Vertrigo 2.30 which in turn uses Apache 2.2.26 as part of its stack I am trying to set up virutal host on Windows 7 home premium.
in httpd.conf I have uncommented Include conf/extra/httpd-vhosts.conf in C\:Windows\System32\drivers\etc\hosts I have

127.0.0.1 localhost
127.0.0.1 localhost
198.0.65.217 talknowradio.com # www
198.0.65.217 paranormalpalaceradio.comcastbiz.net # vhost

in C:\Program Files (x86)\VertrigoServ\Apache\conf\vertrigo.conf I have


<Directory "C:\Program Files (x86)\VertrigoServ\www">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from All
</Directory>

and

<Directory "C:\Program Files (x86)\VertrigoServ\www\vhost">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from All
</Directory>

Also in the WWW folder I alread have the vhost and site folder with index.html already inside all having read write permission


In conf/extra/httpd-vhosts.conf I have

<VirtualHost *:80>
ServerAdmin webmaster@talknowradio.com
DocumentRoot "C:/program files (x86)/vertrigoserv/www"
ServerName talknowradio
ServerAlias www.talknowradio.com
</VirtualHost>


<VirtualHost *:80>
ServerAdmin webmaster@talknowradio.com
DocumentRoot "C:/Program Files (x86)/VertrigoServ/www/vhost"
ServerName paranormalpalaceradiocomcastbiznet
ServerAlias www.paranormalpalaceradio.comcastbiz.net
<Directory "c:/vhost">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
</Directory>
</VirtualHost>

my primary domain still works perfectly but the virtual host I created keeps loading 403 error page I have checked the Apache error log and I found two instanses of

[Tue Dec 31 08:33:29 2013] [error] [client 198.0.65.217] script 'C:/Program Files (x86)/VertrigoServ/www/vhost/modules.php' not found or unable to stat, referer: http://paranormalpalaceradio.comcastbiz.net/

I have no clue where or why its reading a module.php file granted I do use Nuke Evolution on my primary site but the only page in the virual host folder is a index.html I have checked and double checked can someone please help before I'm bald lol
Back to top
Anaksunaman



Joined: 19 Dec 2013
Posts: 54

PostPosted: Fri 03 Jan '14 3:10    Post subject: 403 Error on Virtual host Reply with quote

Oh noes! Not bald! Shocked Very Happy

Seriously, though, 403 Forbidden is often the signs of Apache trying to reach a directory where it has no access. I noticed that you have:

Code:
<Directory "c:/vhost">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
</Directory>


Theoretically, proper use of the Directory directive should allow you to get outside the web root but on Windows the only way I have found consistently to bypass these errors on Windows is to use a symbolic link.

Furthermore, if you are intending to set options for the directory to serve files from, the DocumentRoot and Directory directive directory should match:

Code:
DocumentRoot "C:/Program Files (x86)/VertrigoServ/www/vhost"
...
<Directory "C:/Program Files (x86)/VertrigoServ/www/vhost">


Note that in any case c:/vhosts is likely unable to be accessed by Apache (your ServerRoot in vertrigo.conf defaults to C:/Program Files (x86)/VertrigoServ/Apache or wherever you installed Vertrigo). Note that if that is the case, then your directory paths should be "C:/Program Files (x86)/VertrigoServ/Apache/www/" and "C:/Program Files (x86)/VertrigoServ/Apache/www/vhost" as well.
Back to top
Anaksunaman



Joined: 19 Dec 2013
Posts: 54

PostPosted: Fri 03 Jan '14 3:58    Post subject: More to report Reply with quote

http://www.apachelounge.com/viewtopic.php?p=26411

This would seem to indicate that indeed the server cannot find your virtual host DocumentRoot.

Code:
Warning: DocumentRoot [C:/Program Files (x86)/VertrigoServ/www/vhost/paranormalpalaceradiocomcastbiznet] does not exist
Back to top
redneckradioman



Joined: 08 Nov 2013
Posts: 9
Location: Houston Texas

PostPosted: Fri 03 Jan '14 5:02    Post subject: Reply with quote

Sorry I lost my place and had not meant to start a second thread I get ahead of myself sometimes anyway

I am running my vhost inside the Vertrigo www folder I had a feeling I may have too lol I made the corrections you mentioned I now have this in my vhost.conf

<VirtualHost *:80>
ServerAdmin webmaster@talknowradio.com
DocumentRoot "C:/program files (x86)/vertrigoserv/www"
ServerName talknowradio
ServerAlias www.talknowradio.com
</VirtualHost>


<VirtualHost *:80>
ServerAdmin webmaster@talknowradio.com
DocumentRoot "C:/Program Files (x86)/VertrigoServ/www/vhost"
ServerName paranormalpalaceradiocomcastbiznet
ServerAlias www.paranormalpalaceradio.comcastbiz.net
<Directory "C:/Program Files (x86)/VertrigoServ/www/vhost">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
</Directory>
</VirtualHost>


and I now have this

<Directory "C:\Program Files (x86)\VertrigoServ\www">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from All
</Directory>

<Directory "C:\Program Files (x86)\VertrigoServ\www\vhost">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from All
</Directory>

in my vertrigo.conf




and it still pulls page cannot be displayed nothing showing in the error log just checked
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 03 Jan '14 8:41    Post subject: Reply with quote

Whatever editor you are using, right click on the icon and choose "Start as Administrator"

Go have a look at your conf files, are they showing what you are expecting to see?
Back to top
Anaksunaman



Joined: 19 Dec 2013
Posts: 54

PostPosted: Fri 03 Jan '14 9:34    Post subject: 403 Error on Virtual host Reply with quote

All right. Let's try this again. Mr. Green

In vertrigo.conf added two new directories:

Code:
<Directory "C:\My Programs\VertrigoServ\www\site1">
     Options Indexes Includes FollowSymLinks
     AllowOverride All
     Order allow,deny
     Allow from All
</Directory>

<Directory "C:\My Programs\VertrigoServ\www\site2">
     Options Indexes Includes FollowSymLinks
     AllowOverride All
     Order allow,deny
     Allow from All
</Directory>

My version (should be used for general reference only) -- http://pastebin.com/RVS6KLVB

And then two simple entries in httpd-vhosts.conf:

Code:
<VirtualHost *:80>

ServerName hellokitty.zapto.org
#ServerAlias hellokitty.zapto.org
DocumentRoot "C:/My Programs/VertrigoServ/www/site1/"

</VirtualHost>

<VirtualHost *:80>

ServerName hellocthulhu.zapto.org
#ServerAlias hellocthulhu.zapto.org
DocumentRoot "C:/My Programs/VertrigoServ/www/site2/"

</VirtualHost>


My version (should be used for general reference only) -- http://pastebin.com/qh6j6kzt

This is what I would start out with. Note that in this case the ServerName matches the exact URL being typed into the browser bar. This is part of how Apache knows which site to serve. So in your case, paranormalpalaceradio.comcastbiz.net should be the ServerName NOT paranormalpalaceradiocomcastbiznet (with no periods). The same goes for ServerName talknowradio.com versus talknowradio. The ServerAlias in these entries looks fine.

So before adding the extra directives you've listed, I would try these changes out (obviously subbing out the proper domains) so that you wind up with:

Code:
<VirtualHost *:80>
     ServerAdmin webmaster@talknowradio.com
     ServerName talknowradio.com
     ServerAlias www.talknowradio.com, *.talknowradio.com
     DocumentRoot "C:/My Programs/VertrigoServ/www/site1/"
</VirtualHost>

<VirtualHost *:80>
     ServerAdmin webmaster@talknowradio.com
     ServerName paranormalpalaceradio.comcastbiz.net
     ServerAlias www.paranormalpalaceradio.comcastbiz.net, *.paranormalpalaceradio.comcastbiz.net
     DocumentRoot "C:/My Programs/VertrigoServ/www/site2/"
</VirtualHost>


You can comment out the ServerAlias for testing purposes as I did above if you like. The * wildcard is just in case you want some other subdomain prefix besides www to redirect to your main page.

The reason I used two new directories is so that you don't have to mess with index.php (which holds the Smarty template you see when you go to localhost). And each directory can be altered independently of the other, in case you want that. Otherwise, your old folder setup should work fine.

I'm not sure what you are doing with the comcastbiz.net name, but if haven't set this up to point to your server somehow, this could cause issues as well. For example, if Comcast is the one hosting the domain, and you need it to point to (hypothetically) paranormal.talkradionow.com (which would be hosted by you), you would either need to set up a domain redirect on their end, a web page to do an instantaneous meta-refresh, or at least a link.
Back to top
redneckradioman



Joined: 08 Nov 2013
Posts: 9
Location: Houston Texas

PostPosted: Fri 03 Jan '14 23:09    Post subject: Reply with quote

Well I was afraid to go with site 1 and site2 for fear of messing things up but I went ahead and modified my virtualhost contain er by the way I got another domain to be sure so its now talknow radio and multiplicity radio anyway I'm getting bot domains to load talknowradio.com

<VirtualHost *:80>
ServerAdmin webmaster@talknowradio.com
DocumentRoot "C:/Program Files (x86)/VertrigoServ/www"
ServerName talknowradio.com
ServerAlias www.talknowradio.com * talknowradio.com
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@talknowradio.com
DocumentRoot "C:/Program Files (x86)/VertrigoServ/www/vhost/multiplicityradiocovu"
ServerName multiplicityradio.co.vu
ServerAlias www.multiplicityradio.co.vu * multiplicityradio.co.vu
</VirtualHost>

now that both load the same site how do we get them to load thier individual sites?
Back to top
Anaksunaman



Joined: 19 Dec 2013
Posts: 54

PostPosted: Sat 04 Jan '14 4:41    Post subject: 403 Error on Virtual host - Multiple Domains Reply with quote

I am glad to hear things are going slightly smoother. Smile

I am unsure of what you want your final set up to be but here it goes.

Ideally, if you want two completely separate sites (e.g. 100% unique content on each), the current folder set up you have listed should work fine. For talknowradio.com, put content in the www folder as defined in your httpd-vhosts.conf. In your set up above, www/vhost/multiplicityradiocovu would be the second site's root folder, so you would put all your content for that site there. Each root folder should have its own main index.html file (or whatever is defined to be the default document served by your set up). Be aware, however, that the way you have nested your files will likely allow the URL talknowradio.com/vhost/multiplicityradiocovu/. This URL will directly access the same site as multiplicityradio.co.vu. If you use separate folders as I did in my example above, you will avoid this (and no, using separate folders should not break anything .)

So, if I were to make a suggestion about the set up, I would use something like:

Code:
<VirtualHost *:80>
     ServerAdmin webmaster@talknowradio.com
     DocumentRoot "C:/Program Files (x86)/VertrigoServ/www/talknowradio"
     ServerName talknowradio.com
     ServerAlias www.talknowradio.com * talknowradio.com
</VirtualHost>

<VirtualHost *:80>
     ServerAdmin webmaster@talknowradio.com
     DocumentRoot "C:/Program Files (x86)/VertrigoServ/www/multiplicityradiocovu"
     ServerName multiplicityradio.co.vu
     ServerAlias www.multiplicityradio.co.vu * multiplicityradio.co.vu
</VirtualHost>


Again, the talknowradio folder would hold content just for the talknowradio.com site and the multiplicityradiocovu folder would hold content for just the multiplicityradio.co.vu site.

This folder set up isn't nececessary, however, so feel free to disregard this suggestion. I know you mentioned something about Nuke Evolution, so that may be a good reason not to switch up the folder layouts. However, you should be able to put a second Nuke installation for multiplicityradio.co.vu in the
www/vhost/multiplicityradiocovu DocumentRoot if you like (assuming Nuke Evolution allows for two or more installations on the same server).

Lastly, some clarification... you mentioned that the same site is being served by both domains at this time. As I mentioned in the first paragraph, the configuration in your last post above should already allow access to both talknowradio.com and multiplicityradio.co.vu as seperate domains. If this isn't happening, the two most likely reasons are a) you copied the same index.html file to both DocumentRoot folders or b) you didn't copy an index.html file to www/vhost/multiplicityradiocovu and the server is defaulting to the default, primary index.html located in www. If neither of these is true, more information may be required...

I like this site, btw Smile. http://redneckdesignz.myftp.org/
Back to top
Anaksunaman



Joined: 19 Dec 2013
Posts: 54

PostPosted: Sat 04 Jan '14 4:49    Post subject: 403 Forbidden Reply with quote

Oops, almost forgot to ask... are you still using the comcastbiz.net name? Because if this is what you are interested in using (vs. the multiplicityradio.co.vu domain for purposes other than testing), there may be extra steps. Apologize, but clarify if I assumed incorrectly in my previous post.
Back to top
redneckradioman



Joined: 08 Nov 2013
Posts: 9
Location: Houston Texas

PostPosted: Thu 16 Jan '14 0:26    Post subject: Reply with quote

Sorry I have not responded in a while got busy but the good news is I know have the virual host working great thank you for everything
Back to top
redneckradioman



Joined: 08 Nov 2013
Posts: 9
Location: Houston Texas

PostPosted: Sat 18 Jan '14 1:41    Post subject: Reply with quote

Hey guys turns out that although I have my virtual servers upand running there is a discripancy none of my virtual host will load in a browser if you type www. into the url they work fine as long as the url is just http:// my main domain can be with or without the www but its the only one I'm putting the urls below so you can see what I mean

http://www.talknowradio.com/
http://yugiohduelnet.com/
http://multiplicityradio.com/
http://multiplicityradio.co.vu/

As you can see Talknow Radio is the only one that will load both way with or without the www

Any ideas folks?
Back to top
Anaksunaman



Joined: 19 Dec 2013
Posts: 54

PostPosted: Sat 18 Jan '14 10:51    Post subject: 403 Error on Virtual host Reply with quote

There could be a couple issues here.

First, with http://www.yugiohduelnet.com/ (vs. without the www) I see an error of:

Code:
Forbidden

You don't have permission to access / on this server.

This would seem to indicate that the root (default) directory for the server is attempting to be served, which, of course, outside users should not have access to. This is usually done when your server can't find the URL you are requesting ("Gee, I don't know what you are talking about... You want the default stuff?") If the current setup is giving you issues, I would try substituting the following entries:

Code:
ServerAlias www.yugiohduelnet.com
ServerAlias *.yugiohduelnet.com


If this doesn't seem to solve the issue, you may want to post your virtual host config (minus any sensitive info, of course).

BTW, while http://www.talknowradio.com/ works, http://talknowradio.com/ does not (it produces the same error as above). So the fix above might work well for that too.

As for the other two sites (both multiplicityradio domains), I would first confirm that the above is also true for them (e.g. they have proper ServerAlias entries) and, failing that, you may need to configure some addition options on the domain registrar side (or possibly update DNS records if you are using a separate DNS host).
Back to top
redneckradioman



Joined: 08 Nov 2013
Posts: 9
Location: Houston Texas

PostPosted: Sat 18 Jan '14 22:57    Post subject: Reply with quote

Ok doing that enabled Yugioh Duelnet to use both http:// and www and Talknow Radio to use www but when Talknow Radio uses http:// it goes to Yugioh Duelnets page

<VirtualHost *:80>
ServerAdmin webmaster@talknowradio.com
DocumentRoot "C:\Program Files (x86)\VertrigoServ\www"
ServerName WWW
ServerAlias www.talknowradio.com
</VirtualHost>

<VirtualHost *:80>

<VirtualHost *:80>
ServerAdmin webmaster@talknowradio.com
DocumentRoot "C:\vhost\yugiohduelnet"
ServerName vhost
ServerAlias * yugiohduelnet.com
</VirtualHost>

The other two site where unaffected by anychanges
Back to top
Anaksunaman



Joined: 19 Dec 2013
Posts: 54

PostPosted: Mon 20 Jan '14 9:33    Post subject: Reply with quote

All right. Clean slate. Very Happy

Since it seems the catchalls may be giving issues, especially based on your last post, here is the recommendation:

Code:
[...]

ServerName talknowradio.com
ServerAlias www.talknowradio.com

[...]

ServerName yugiohduelnet.com
ServerAlias www.yugiohduelnet.com

[...]

ServerName multiplicityradio.com
ServerAlias www.multiplicityradio.com

[...]

ServerName multiplicityradio.co.vu
ServerAlias www.multiplicityradio.co.vu

Obviously the [...] means all the normal stuff in between.

As to the other issue with the multiplicity domains, you may need make sure that the www prefix is being redirected to your server. Usually this can be accomplished via the domain registrar panel.

To clarify, are the domains you host all redirects (e.g. from www.talknowradio.com to some.dynamicip.com)?
Back to top
redneckradioman



Joined: 08 Nov 2013
Posts: 9
Location: Houston Texas

PostPosted: Mon 20 Jan '14 16:48    Post subject: Reply with quote

That made it worse the only thing that worked after that was the www.talknowradio and the http://www.talknowradio.com all others went to page cannot be displayed
Back to top
Anaksunaman



Joined: 19 Dec 2013
Posts: 54

PostPosted: Sun 26 Jan '14 13:11    Post subject: 403 Forbidden - Virtual Host and DNS configuration Reply with quote

Well that's not supposed to happen. Rolling Eyes

The conclusion seems to be then, if your httpd-vhosts.conf file is set up correctly, that your DNS (Domain Name Service) for those sites isn't.

How you approach this will depend a lot on who is hosting your DNS for these sites, but in essence you need to make sure that each site has one or more prefixes specified as belonging to that domain. In this case, you need a www prefix listed in your basic DNS providers configuration files.

If your are using domain forwarding through your registrar, they would most likely handle the default DNS for the domain and the changes would need to be handled there. If it's a third party managed DNS provider, the changes would need to be made there.

Here's a screenshot to help give you an idea of what you are looking for. The first is from a domain registrar with URL forwarding to a dynamic DNS service (you still add prefixes with the registrar in this case), the second is from a hosting company control panel and the third is from a third party (non-dynamic) managed DNS provider:

http://s9.postimg.org/ovc6boi6n/sub.png



If you are unsure about your DNS set up (who provides it, etc) we can work from there.

And just for refernce, following httpd-vhosts.conf has been tested with three live sites and works fine for me under VertrigoServ 2.30. DNS resolution for www is set up correctly so the www prefixes work fine:

Code:
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.

#
# 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 webmaster@dummy-host.localhost
#    DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.localhost"
#    ServerName dummy-host.localhost
#    ServerAlias www.dummy-host.localhost
#    ErrorLog "logs/dummy-host.localhost-error.log"
#    CustomLog "logs/dummy-host.localhost-access.log" common
#</VirtualHost>


# Remember that this first vhost entry determines the default directory to serve files from!
# e.g. 127.0.0.1

# Virtual Hosts For Basic HTTP Services

<VirtualHost *:80>

ServerAdmin contact@domain1.biz
ServerName domain1.biz
ServerAlias www.domain1.biz
DocumentRoot "C:/My Programs/VertrigoServ/www/vvv/site1/"

</VirtualHost>


# A second host

<VirtualHost *:80>

ServerAdmin contact@domain2.org
ServerName domain2.org
ServerAlias www.domain2.org
DocumentRoot "C:/My Programs/VertrigoServ/www/vvv/site2/"

</VirtualHost>


# A third host

<VirtualHost *:80>

ServerAdmin contact@domain3.net
ServerName domain3.net
ServerAlias www.domain3.net
DocumentRoot "C:/My Programs/VertrigoServ/www/vvv/site3/"

</VirtualHost>
Back to top
redneckradioman



Joined: 08 Nov 2013
Posts: 9
Location: Houston Texas

PostPosted: Sun 26 Jan '14 17:29    Post subject: Reply with quote

Thanks I'll check into it
Back to top


Reply to topic   Topic: 403 Error on Virtual host View previous topic :: View next topic
Post new topic   Forum Index -> Apache