Network Troublshooting > Linux Servers Support
Apache over LAN
(1/1)
creator:
Hi guys!
i use an apache web server. I have a few pho scripts.
I want apache to service clients over a lan. how do i do it? I know prolly this is a FA, but this is really *imp* i got present my project over a LAN in college on monday ..please guys let me know!!
thanks n advance :)
Ricky:
you havn't told that what is your distribution.. mostly it is installed during installation.. if redhat then do
--- Code: ---service httpd status
--- End code ---
it it says it is not running then try to start it.. using
--- Code: ---service httpd start
--- End code ---
if it is in your system it will start.
It is not then consider a rpm of apache that will make it easier to install.
If it is there and running then you can put your files ie. html, php in /var/www/html/ and open in your browser .. like..
http://localhost/filename.htm or on lan http://ip addredss/file.htm, currently it is confugered for only one account but you can make it to do several sites.. called virtual sites. do to so i suggest you to read some apache documantaion.. that will also help u to do more..
make sure you have also installed php support.. to run php
creator:
I am running PCQ Linux 2004 :) I have many php scripts running already..it works fine for loopback interface.. http://127.0.0.1/file.php works fine...I want to know if i need to make any changes..files have to access over a LAN?
Because I have to demonstrate this project of mine over a LAN ...how do i simulate it at home(on a single PC)? And what changes do I need to make when I want it to run over a LAN
I am running apache 2.0.4
Thanks in advance!
Ricky:
look your httpd.conf and find the following entries..
--- Code: ---<VirtualHost *>
DocumentRoot /www/example1
ServerName www.example1.com
# Other directives here
</VirtualHost>
--- End code ---
these are usually commented out , uncomment them and u have ur virtual website running. You also need to set your internal DNS to resolve that website to that ip. that is another story.. u have to add a zone. i suggest you to look a basic tutorial so that u can get clear idea how it works..
dragoncity99:
Hi friend,
Do this steps and u should be okay and up going.
1. Open httpd.conf file in "/etc/httpd/conf" directory.
2. Look for a line like this:
"Servername new.host.domain: 80"
change it to Servername <ur server's ip address> : <port>
i.e.====> Servername 192.168.1.1:80
If in front of it has a # symbol delete it.
3. Save and exit.
4. Type service httpd start
5. Bingo, u r done. Open any web browser and type in ur webserver's ip address.
I assume u use Redhat 9.
Coz (service httpd start) only works in Red hat/Fedora
Navigation
[0] Message Index
Go to full version