|
|
 |
Author |
Message |
Eyecu

Joined: 08 Sep 2007
Posts: 1
|
Posted:
Sun Sep 09, 2007 12:39 am |
  |
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 |
|
|
  |
 |
cigraphics

Joined: 21 Aug 2005
Posts: 148
Location: Romania, Pitesti
|
Posted:
Sun Sep 09, 2007 5:48 pm |
  |
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 |
|
|
    |
 |
razvan162

Joined: 17 Mar 2009
Posts: 3
|
Posted:
Tue Mar 17, 2009 10:20 pm |
  |
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. |
|
|
  |
 |
|
|
View next topic
View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
Powered by phpBB
© 2001, 2002 phpBB Group :: FI Theme
All times are GMT
|