• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Apache ServerName directive

Captain_Thunder

New Member
Not sure if this is in the right place, but in the Apache httpd.conf file (on Windows XP) there is a variable called ServerName. Is this supposed to hold your PC's IP address, or your website's domain name? I originally set my domain name at startup to be localhost, but now I want a DynDNS name to point to it. I can get to my site just fine via my DynDNS name, but no one else can.
 
Apache Manual said:
The ServerName directive sets the hostname of the server; this is used when creating redirection URLs. If it is not specified, then the server attempts to deduce it from its own IP address; however this may not work reliably, or may not return the preferred hostname. For example:

ServerName www.example.com

would be used if the canonical (main) name of the actual machine were simple.example.com.

If you have it set to localhost, then of course no one else can access it. localhost is a dynamic name and is different for every person.
 
It is not set to localhost. It is currently set to my IP address. Is there anywhere else in the file where your IP address needs to go? Or is pointing your name to your IP (I'm using DynDNS), setting Listen to 80, and putting your name into ServerName all you need to do to make your site accessible?
 
Your router needs to accept incoming traffic. If that's done, then that should do it.

I'm not familiar with Windows Apache, so maybe someone who knows a bit more about Windows can help? I do mostly *NIX severs.
 
I believe the router would be the problem, everything else is configured as I stated earlier. How would I make my router accept traffic :confused4
 
Go to your router's settings. (To get to mine I type my router's IP address in my browser bar) and have it allow incoming traffic on port 80.

Check your router's manual
 
Last edited:
Incredible, I think my ISP blocks every single port (I cheked them on www.canyouseeme.org, all the standard ones and a few random). Any solutions? Or should I just go with a hosting company; I heard that ISP's block ports because you can get major viruses from incoming requests.
 
Which ones does your ISP not block? If this website is just for your friends, it doesn't really matter what port, you can just tell them to go to port whatever.
 
Last edited:
No, my ISP blocks ALL ports. I think. None of the standards work, and none of the random ports I tried worked, and I really don't want to have to try every single port for 1 to 8080. However, I will...
 
Oh, my port 80 redirect name on www.no-ip.com just shows my IP address in the URL bar when I type it in (the site loads fine though). Is there anyway to put a No-IP name over my IP address even though I am running off port 8080?
 
Running off of port 8080 isn't the smartest thing to do. But I'm not familiar with no-ip, so I don't know.
 
It's usually used for the router's settings. If it isn't on yours, then that's fine. You could try it. Just make sure that your router's username and password aren't 'admin' and 'admin'. That's the default and most people don't change them.
 
Back
Top