November 24, 2024, 04:34:56 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Apache over LAN  (Read 7835 times)

Offline creator

  • Linux Noob !
  • *
  • Posts: 7
Apache over LAN
« on: April 24, 2004, 06:31:05 PM »
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 :)

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Apache over LAN
« Reply #1 on: April 25, 2004, 06:52:36 AM »
you havn't told that what is your distribution.. mostly it is installed during installation..  if redhat then do
Code: [Select]
service httpd status it it says it is not running then try to start it.. using
Code: [Select]
service httpd start 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

Offline creator

  • Linux Noob !
  • *
  • Posts: 7
Apache over LAN
« Reply #2 on: April 25, 2004, 11:25:01 AM »
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!

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Apache over LAN
« Reply #3 on: April 25, 2004, 11:37:48 AM »
look your httpd.conf and find the following entries..
Code: [Select]
<VirtualHost *>

DocumentRoot /www/example1
ServerName www.example1.com

# Other directives here


</VirtualHost>
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..

Offline dragoncity99

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 551
Apache over LAN
« Reply #4 on: April 29, 2004, 03:42:10 PM »
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