Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Originally posted by LinuxLala 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?
Firstly you need to make sure your web server is accessable via localhost. 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.
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.