LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Virtual Hosts Help please... (https://www.linuxquestions.org/questions/linux-general-1/virtual-hosts-help-please-47527/)

vbp6us 02-27-2003 11:28 PM

Virtual Hosts Help please...
 
Hi,

This is what i have under virtual hosts:

NameVirtualHost 192.168.2.27

<VirtualHost 192.168.2.27>
ServerName www.asappainting.com
DocumentRoot /srv/www/htdocs/asappainting/
ServerAlias asappainting.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName www.theclothingline.com
DocumentRoot /srv/www/htdocs/wyd/
ServerAlias theclothingline.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName bigtymers.com
DocumentRoot /srv/www/htdocs/bigtymers/
DirectoryIndex index.php INDEX3.html index3.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName dropside.com
DocumentRoot /srv/www/htdocs/dropside/
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName hopesandcomputers.com
DocumentRoot /srv/www/htdocs/hopesandcomputers/
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

The first two are the only sites that work for some reason. Could it be that they are the only two that have real domain names?? For example www.asappainting.com is the real domain name and so is theclothingline.com for the other site.

How can i make it were those other sites/virtual hosts work too? Is there something different i need to add for theirs? They do not have domain names so when someone wants to view them they must do this in the browswer:

http://(mywanip)/dropside or /hopesandcomputers or /bigtymers

Thats what i want to be able to do...hwo would i do that?

thanks.

BenCarlisle 02-28-2003 02:40 PM

If you want people to get to your site by typing in the URL http://bigtymers.com, then you must register that domain name.

Just because you enter it in your Apache configuration file does not mean that the rest of the world is aware of your name selection.

HOWEVER, that being said, another option is to create virtual subdomains. That would allow you to host different web pages at various subdomains under the ones that you do have. For example, you own asappainting.com. As it turns out (assuming your registrar set you up this way - most do), you also control any branch off that. You could configure your Apache server to respond to http://dropside.asappainting.com/ or http://bigtymers.asappainting.com/.

You would do this the same way in your Apache configuration file, for example:

<VirtualHost 192.168.2.27>
ServerName dropside.asappainting.com
DocumentRoot /srv/www/htdocs/dropside/
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

Users would access this VirtualHost by entering http://dropside.asappainting.com/ in the web browser.

If this doesn't fully satisfy you, you need register each domain name you want to use.

cheers
-B

vbp6us 02-28-2003 08:09 PM

ok. That makes sense. Thanks a lot. Since i have no loop back on my MS Router(yeah, i know, but its better than my old linksys) i cannot test my urls out. For example asappainting.com or theclothingline.com...i cannot test them. I just get errors. I ask others to test them for me. :D

Thanks.

vbp6us 02-28-2003 08:17 PM

Ok...made the changes.

Can you try the following to see if they work please:

www.asappainting.com
www.theclothingline.com
www.bigtymers.asappainting.com
www.dropside.asappainting.com
www.hopesandcomputers.asappainting.com

thanks. All i did was replace those w/ what i had before. Hope it works. :)

Crashed_Again 02-28-2003 08:35 PM

Yes
Definetly Yes
No
No
No

Cannot establish connections to the last 3 urls.

vbp6us 02-28-2003 10:07 PM

Thats weird. Now does it work? This is my new Vh code:

NameVirtualHost 192.168.2.27

<VirtualHost 192.168.2.27>
ServerName www.asappainting.com
DocumentRoot /srv/www/htdocs/asappainting/
ServerAlias asappainting.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName www.theclothingline.com
DocumentRoot /srv/www/htdocs/wyd/
ServerAlias theclothingline.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName www.bigtymers.asappainting.com
DocumentRoot /srv/www/htdocs/bigtymers/
ServerAlias bigtymers.asappainting.com
DirectoryIndex index.php INDEX3.html index3.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName www.dropside.asappainting.com
DocumentRoot /srv/www/htdocs/dropside/
ServerAlias dropside.asappainting.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName www.hopesandcomputers.asappainting.com
DocumentRoot /srv/www/htdocs/hopesandcomputers/
ServerAlias hopesandcomputers.asappainting.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

Crashed_Again 03-01-2003 10:30 AM

No the last three still do not work.

vbp6us 03-01-2003 01:33 PM

doh..any suggestions? Do i need to change something on the dns side?

BenCarlisle 03-01-2003 10:17 PM

If I drop the WWW it works fine....

example:

bigtymers.asappainting.com works.... If you want to prefix www onto it, make sure your ServerAlias matches.

For example,

<VirtualHost 192.168.2.27>
ServerName www.bigtymers.asappainting.com
DocumentRoot /srv/www/htdocs/bigtymers/
ServerAlias www.bigtymers.asappainting.com
DirectoryIndex index.php INDEX3.html index3.htm index.shtml
</VirtualHost>


cheers,
-B

Sifvion 03-02-2003 12:36 AM

remove WWW for the subdomain. Subdomain dont have WWW

vbp6us 03-02-2003 12:50 PM

now do they work both ways?

vbp6us 03-02-2003 04:22 PM

*bump* Sorry i really need to know. Time is a factor. :(

Crashed_Again 03-02-2003 04:25 PM

Yes it works but without the www. You must go to hopesandcomputers.asappainting.com etc.. for it to work.

vbp6us 03-03-2003 01:18 PM

Ok..it works. :) Im not at home so testing out the urls should work and they do. The problem I see is that it's loading www.asappainting.com site instead of going into the folder i specified for each subdomain name. Ex:

<VirtualHost 192.168.2.27>
ServerName www.dropside.asappainting.com
DocumentRoot /srv/www/htdocs/dropside/ <-----------
ServerAlias www.dropside.asappainting.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

BTW, which "www" do i drop for it to work as www.dropside.asappainting.com??

ALSO, i have the following in my ip address settings in zoneedit.com:

asappainting.com
bigtymers.asappainting.com
dropside.asappainting.com hopesandcomputers.asappainting.com
www.asappainting.com

are those right?

Basically, right now its going to asappainting.com's folder and getting the index.html + all other files from there. Please help me fix this. :)

Thank you.

Buttercups 07-10-2003 10:19 PM

finally.. i thot i was the only one with the www and no www problem. cud it possibly my dns settings?


All times are GMT -5. The time now is 08:39 PM.