|
|
|
|
||||||
| alt.apache.configuration Apache web server configuration issues. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I am using Apache 2.2.3 on XP. As I have dynamic IP, I set up a DNS with www.dyndns.org. Locally (on my pc) I can access pages using the domain name I set for my IP. However, accessing the web pages on my PC from other test sites is failing. There is nothing in the access log so the request is not reaching my PC. I also tried to set up VirtualHost but nothing ed. Am I missing something? Do I need to do some Apache configuration for external requests (on my pc the domain is working fine)? Thanks |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On 3 Feb, 23:10, oren.beren...@gmail.com wrote:
> Hi, > > I am using Apache 2.2.3 on XP. > > As I have dynamic IP, I set up a DNS withwww.dyndns.org. Locally (on > my pc) I can access pages using the domain name I set for my IP. > However, accessing the web pages on my PC from other test sites is > failing. There is nothing in the access log so the request is not > reaching my PC. > > I also tried to set up VirtualHost but nothing ed. > > Am I missing something? Do I need to do some Apache configuration for > external requests (on my pc the domain is working fine)? > > Thanks If you are on a LAN and have a router which serves more than one single computer you will need to set up your server machine so it always boots up with the same IP address each time. Goto to your routers administration interfaceand login, and make sure that the DHCP is set to start at an address that leaves some IP address free below it, so say if your router provides DNCP from 192.168.1.2 to 192.168.1.254 you need to start this off at 192.168.1.20 then right click your network icon in XP or goto network connections and obtain the properties of your connection, instead of allowing "obtain IP address automatically" set it manually to a value below 192.168.1.20 making sure not to set it equal to the routers IP address. Set also the netmask, (probably 255.255.255.0 and default gateway to the values you obtained) the router (or gateway) and machine IP can also be found like so: to find the IP address use this or your preferred method goto start->run and type cmd in the command window type ipconfig the IP address of your machine is given there, make mental note of it the "default gateway" is your routers IP address. Now you must tell apache to listen on this new statically assigned LAN ip address, usually by default it is, so this should be fine. (It might also be listening on 127.0.0.1 localhost as well which doesnt matter) to make sure apache can be reached on ports 443 and 80 at that IP address telnet ip 80 (where ip is the LAN static ip just set) if the window goes blank then apache is listening to that IP address, if you get a timeout then adjust apaches httpd.conf by adding Listen ip:80 (and make sure that if it is set up with https that you also add Listen ip:443) (to make the window come back to the prompt press [enter] a few times you have now set a static LAN IP address for your machine, made sure apache is listening on that IP address, and found out which ports you need to forward, whether just 80 or 443 as well. Now port forward those ports from the public side of your router to the LAN ip address to do this you connect to your router and use its administration web interface to forward port 80(HTTP) and 443(HTTPS) to the IP address of the machine running your apache server, if you dont need SSL, then you can just forward port 80. It might be under "services", "firewall rules" or "applications/games" Once you have set up the router to forward those ports you need to test that your machine is allowing incoming connections, I like to use the jigsaw validator by w3.org and type in a URL, but you can also use an phproxy and so on. Be aware that any firewalls you have (such as windows firewall ) will need to have a rule set up, On "the network adapter your computer is using" Allow incoming ports 80 and 443 from ALL to "server IP" or just allow apache and "remember" you might also need further rules depending on how your firewall blocks access to certain system daemons. Usually it's OK, but in general once you start to ask for apache to serve data your firewalls should ask your permission and allow you to override for ever. In practise using Norton or other "messy" software, you might find it annoying hard to allow for all time. If you run XP's firewall as well as another, turn it off. If you run only XP's firewall then you must configure it for incoming connections by creating an execption for apache on port 80 and 443, a bit like your router needed to have the ports forwarded so will the XP firewall as it is really a NAT packet filtering firewall and so works in a similar way. Be aware also that if your server machine connects using a wireless card you will have to stop XP sleeping this device which might cause loss of connection while in screen saver etc... In extrememly rare cases ISPs block access to port 80, or only lease to you an internal IP address, the second of these is probably not the case if you dyndns settings were approved. My money is on neither of these to be the case - but I mention them here for completeness. |
|
![]() |
| Outils de la discussion | |
|
|