Welcome to WebmasterWorld Guest from 35.171.45.91

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

A bit baffled with virtual server config....

Having issues with virtual server settings..

     
5:16 am on Jan 6, 2004 (gmt 0)

New User

10+ Year Member

joined:Jan 6, 2004
posts:3
votes: 0


Ok.. please bear with me as this post is fairly long.
Learning Linux as I go along and wanted to setup a webserver to practice more stuff...and to use my other Linux machines to connect "remotely and install stuff like Geeklog and other CMS thingamajigs

1. Activated Apache on my Fedora Core box
2. Registered with free domain service (dynu.com) example.dynu.com
3. Set port forwarding at dynu.com to 81 since my ISP blocks port 80
4. Tossed yowling cat off my lap (must remember to get her fixed)
5. Set server from DHCP to static ip, activated forwarding on Linksys befsr41 router to forward all port 81 requests (and the ftp etc etc) to the LAN ip of the server.
6. See #4
7. Typing my WAN ip:81 into a browser gets me to the default Apache server success page.
8. Typing http://www.example.dynu.com:81 gets me "No web site is configured at this address."

I messed around for days with virtual server configurations but nothing worked. It then checked the accounty status page at dynu.com and while the mail and ftp listing point to the correct WAN ip, the two named listings www.example.dynu.com and http example.dynu.com points to another address that seems based on dynu's main name server.
So far, there has been no response from tech support.

While that is being resolved, I am hoping you kind folks can resolve some confusion for me about the virtual hosts.
I primarily use the HTTP tool in Fedora Core and sometimes webadmin or just directly edit the httpd.conf file, but I am still confused. The instructions I read on how to setup Apache for Fedora Core stated that I needed to setup a name based virtual host. Where it asked for ip I entered the LAN ip of the server, where it asked for Host Name I entered www.example.dynu.com - should this have been www.example.dynu.com:81?
Under aliases I entered example.dynu.com.. again, should the :81 suffix be there as well?

Also, what is the function of the ip based virtual host? Do I need to create one of those as well?

And, am I correct in assuimg that if I register another domain, it's just a matter of creating another name based virtual host and having it point to another folder?

Sorry about the lengthy post. I suspect the cause of the problems is on dynu's side, but since this is my first server setup I am paranoid....

Any assistance and advice will be greatly appreciated..

[edited by: jdMorgan at 9:13 pm (utc) on Jan. 8, 2004]
[edit reason] Examplified [/edit]

5:30 pm on Jan 8, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Hi karelj,

Welcome to WebmasterWorld!

I can't answer your question, but I'll bet someone can... <bump>

Jim

12:00 am on Jan 9, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 1, 2003
posts:392
votes: 0


For each virtual domain, you can as a minimum just have the following in httpd.conf:

<VirtualHost *>
DocumentRoot /home/example.com/web
ServerName www.example.com
</VirtualHost>

This assumes that the DNS for each site will point to an IP for your machine. The * says accept connections on any IP the machine has. There should also be a "NameVirtualHost *" line in the httpd.conf.

You can change the default port with the "Port" command in httpd.conf (should currently be "Port 80"), so changing that to Port 81 should make that the default port for all virtual domains (can't test that bit here, too many firewalls...).

Bear in mind you don't actually need to have domains on external DNS to test them locally - just add them to your Hosts file (probably /etc/hosts) and point them to 127.0.0.1.

Hope this helps.