IP addresses instead of localhost or 127.0.0.1
I want to buils a web server which will work fine not in localhost. It should work online as a web server from which i can host my own websites and visitor can visit these from other PCs. So, how can i proceed?? I am using PHP, apache, mysql on the Windows Xp Pro Platform. Any suggestions please??

thanx :)

Dani AI

Generated

Useful summary and practical checklist that fills gaps in the thread (building a public Apache/PHP/MySQL site from a Windows XP box).

As noted, a public IP makes DNS simpler; and correctly suggested dynamic-DNS when you cannot get a static IP. Below are the concrete steps most replies left out, plus critical safety notes you need if this server will be reachable from the Internet.

  1. Network basics (LAN -> Internet)
  • Give the server a fixed private IP on your LAN (example: 192.168.1.100) via the router's DHCP reservation or by setting a static address in Windows.
  • On your router forward TCP ports 80 (HTTP) and 443 (HTTPS) to that private IP. If the ISP blocks port 80 you will need an alternate port or a hosted solution.
  • Windows firewall must allow Apache (httpd.exe) inbound on the forwarded ports. If IIS is installed it often grabs port 80—stop/disable it or change ports.
  1. Apache / MySQL config snippets (minimal)
    
    # httpd.conf
    Listen 80
    ServerName example.com:80

<VirtualHost *:80>
DocumentRoot "C:/www/mysite"
ServerName example.com
</VirtualHost>

my.ini (MySQL)

bind-address = 127.0.0.1 # keep DB local unless you explicitly need remote DB access



3) Domain and DNS
- Register a domain and point its A record to your public IP; if you have a dynamic IP use a dynamic-DNS provider and point the domain (or a CNAME) to that hostname. Lower the DNS TTL while testing.

4) Security and testing
- Do not expose admin tools (phpMyAdmin) without restrictive access rules. Use strong passwords, remove default/example sites, and enable HTTPS. Modern certificate authorities (e.g. Let's Encrypt) require a real domain to issue certs. Test from outside your LAN (phone on cellular or a friend) because some routers do not support hairpin NAT.

Important safety note: Windows XP is end-of-life (support ended April 8, 2014). Running a publicly reachable server on XP is a high security risk—use a supported OS or a hosted/VPS provider for public sites.

Recommended Answers

All 6 Replies

To host your own webserver you need to have a Static IP Address assigned to your PC/Server. This is set up by your ISP - at a fee! So contact your ISP and ask them about setting you up with a Static ISP. When you have one you can then access your PC using that ISP. You should research (heavily) the security implications and setting up IIS to allow only authorised traffic to authorised pages/folders/content etc.

You still can host even if your IP is dynamic. Last time I tried http://www.dyndns.org to host my own server. It's pretty good and free. But you can only get subdomain. For domain, you have to check it out. You might want to take a loot at there.

Hope it helps.

To host your own webserver you need to have a Static IP Address assigned to your PC/Server. This is set up by your ISP - at a fee! So contact your ISP and ask them about setting you up with a Static ISP. When you have one you can then access your PC using that ISP. You should research (heavily) the security implications and setting up IIS to allow only authorised traffic to authorised pages/folders/content etc.

Thank You. I will try to do this. This is a good advice for me. But if i wanna using apache web server then wat will happen??

You still can host even if your IP is dynamic. Last time I tried http://www.dyndns.org to host my own server. It's pretty good and free. But you can only get subdomain. For domain, you have to check it out. You might want to take a loot at there.

Hope it helps.

thanx. but i want domain. can you note me the procedures of your startings for your own domain step by step for me??
;)

ZoneEdit provides DNS for your domain. Go to http://www.zoneedit.com for more information. You still have to use dyndns with zoneedit.

Use

You can point a full domain to your Server using this service. Simply donate to keep it going. It's free...but pay a bit for the ease please.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.