Setting up a Webserver
Hi guys,
I have a fixed IP address and a DNS address (both different :) How do I configure Apache to run my webserver? If I don't get a domain name can people from outside still access my website. |
Without a domain name they could access it by IP, but it is certainly easier if you have a nice easy to remember domain name. There is extensive documentation on all the various features of apache and there configuration on Apache's HTTPD site. If you have specific questions on configuring a certain feature feel free to ask, but "How do I configure Apache to run my webserver" is quite vague and there could be hundreds of different answers you might be looking for.
|
At least Red Hat (I can see, it is one of your distroes) comes with apache (the web server. to see if it is running, open your browser and type the following in as the address:
http://127.0.0.1 if you see anything but a error, you have already a web server running. Then you need to locate the files of the web server. The files are sometimes placed in /var/www/html. sometimes not. you may need to dig a little around. If you get a error message, you need to install the apache rpms. Cheek all the Red Hat CD's and install all apache* packages you see fit. good luck and happy hacking |
OK guys so I did a few things. Now here's the scene.....
# Portions of my httpd.conf Listen *:80 ServerName localhost ServerName 61.16.150.118 DocumentRoot "/var/www/web" ############################# Now this is my /var/www/web/index.html <HTML> <Body> <B>Hello Web!</B> </Body> </HTML> Now I do a: service httpd start and get an [OK] On opening 61.16.150.118 in the browser I get an error: "Connection was refused". So what's up? |
For got to add that I do have a localhost set-up. It's supposed to do a DocumentRoot on /var/www/html. But I have commented it out for now.
|
Quote:
http://127.0.0.1/ If that works then try and access it via your lan. That is if you are connected to a lan of course: http://10.10.1.1/ <-- your IP address is probably different If you get connection refused on the lan then your firewall is probably blocking inbound HTTP connections in which case you'll need to add the following rule to your firewall: #iptables -I INPUT 1 -p tcp --dport 80 -J ACCEPT Once you get it working through your lan try your static IP address. If that still doesn't work it might mean that your ISP is refusing conections on port 80. If that's the case you'll need to have Apache listen on a different port. |
OK. Thanks codedv. I'll look into ur suggestions and post again if I am successful and even if I am not :D
Thanks |
i get the same error when i try to find my server.
|
i skimmed this thread but is the apache webserver actually started? redhat doesnt start it by default...
you always get a connection refused if it isnt started. G |
redirecting domains
You can get your own domain for free at www.dot.tk where you can register your domain and it will redirect users to your IP without showing them your IP. And it's free!
|
It gets started fine.
|
All times are GMT -5. The time now is 04:05 AM. |