Apache2Triad Help, Support and Development Forum Index Apache2Triad Help, Support and Development
The apache2triad help , support and development forums
 

Virtual Hosts not working no matter what i do.
Click here to go to the original topic

 
       Apache2Triad Help, Support and Development Forum Index -> Apache2Triad Support
View previous topic :: View next topic  
Author Message
Eyecu



Joined: 08 Sep 2007
Posts: 1

Posted: Sun Sep 09, 2007 12:39 am    Post subject: Virtual Hosts not working no matter what i do.  

Hi all,

I've read thru post after post regarding vhosts. And im still having issues. I will try and explain this completely. Heres my setup.

domain1 - registered at godaddy and forwarded to ip.address:8080
domain2 - thru no-ip and port 80 redirected to ip.address:8080

I am behind a router but have the portforward for 8080 pointed to the serverpc.

Now my httpd.conf.

Code: #
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:8080
Listen 8080


Code: # ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin admin@localhost

Code: # If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
ServerName localhost:8080

Code: #
# Use name-based virtual hosting.
#
NameVirtualHost 71.191.39.70:8080

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

<VirtualHost 71.191.39.70:8080>
   ServerName localhost
   ServerAdmin webmaster@localhost
   DocumentRoot c:/apache2triad/htdocs
   ErrorLog logs/error.log
   CustomLog logs/access.log common
</VirtualHost>

<VirtualHost *:8080>
   ServerAdmin webmaster@tgc-gaming.com
   DocumentRoot c:/apache2triad/htdocs/www/tgc-gaming.com 
   ServerName www.domain2.com:8080
   ServerAlias domain2.com
   ErrorLog c:/apache2triad/logs/domain1.com2-error.log
   CustomLog c:/apache2triad/logs/domain2.com-access.log common
</VirtualHost>

<VirtualHost *:8080>
   ServerName www.domain1.com:8080
   ServerAdmin webmaster@domain1.com
   ServerAlias domain1.com
   DocumentRoot c:/apache2triad/htdocs/www/domain1.com
   ErrorLog c:/apache2triad/logs/domain1.com-error.log
   CustomLog c:/apache2triad/logs/domain1.com-access.log common
</VirtualHost>


host file
Code: 192.168.1.3       localhost
192.168.1.3         www.domain2.com
192.168.1.3       www.domain1.com

Now with this setup:

Domain2 can be accessed, but in the address bar its showing http://ip.address:8080

Domain1 is going to Domain2's document root, but remaining as http://domain1.com in the address bar

Any help with this would greatly be appreciated.

Thanks
Eyecu
Back to top  
cigraphics



Joined: 21 Aug 2005
Posts: 148
Location: Romania, Pitesti

Posted: Sun Sep 09, 2007 5:48 pm    Post subject:  

Add to hosts like this

192.168.1.3 localhost
192.168.1.3 www.domain2.com domain2.com
192.168.1.3 www.domain1.com domain1.com

NameVirtualHost 192.168.1.3:8080 or *:8080


in VirtualHost 192.168.1.3:8080 or *:8080

it will work only on your computer this shoul solve your problem
Back to top  
razvan162



Joined: 17 Mar 2009
Posts: 3

Posted: Tue Mar 17, 2009 10:20 pm    Post subject:  

I have the same problem....nothing is working.
I am tring to do a subdomain in httpd.conf

My domain is www.myzone.ro and i want to make some subdomains like www.test.myzone.ro
My root is c:/apache2triad/htdocs and my ip is dynamic (i use a ip update soft) .
please tell me what can i do...pls help.
Back to top  
 
       Apache2Triad Help, Support and Development Forum Index -> Apache2Triad Support
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.13 © 2001, 2002 phpBB Group