|
|||
|
|||
Outside Computer Links |
Apache Server on linux |
Questions
and Answers: Apache Server
1.
Is Apache installed?
rpm-qa | grep httpd
2.
Is Apache running?
Ps -ef | grep httpd
3.
How to start and stop Apache?
/etc/init.d/httpd stop
/etc/init.d/httpd start
or go to /etc/rc3.d
./S85httpd stop
./S85httpd start
This is a soft link. You can create if not there:
ln -s /etc/init.d/httpd /etc/rc3.d/S85httpd
4.Where
are web files uploaded for your web site?
/var/www/html
5.What
is default home page and how do you set on LAN for local viewing of web pages?
/var/www/html/index.html
http://192.168.0.XX (index.html
is default home page)
6.How
do you check if Apache is working on your linux computer (that has the web
site):
http://localhost/
7.
How do you setup a local domain for the web site to be seen by other computers
on the LAN?
First
of all, check and see if you have a file called /etc/init.d/httpd
If
you do, type the following command to create a link in /etc/rc3.d
ln -s /etc/init.d/httpd /etc/rc3.d/S85httpd
In
order to create a local domain called testmind.com, you have to do the following
steps:-
1.
Run the command: netstat -an |grep
LISTEN
You
will see what IP address port 80 is bound to. It's most likely bound to
127.0.0.1
2.
After backing up the file, edit httpd.conf.
Look for the line where you see 127.0.01, replace it with the IP of your
machine. Stop/start the web server
3.
Make sure you have an entry in your /etc/hosts, binding the machine IP to
testmind.com
4.
Also make sure that this entry exists in ALL your other machines in the house.
(In Windows machines, it should be in 'host' and also 'lmhosts'
Additional
Information:
Apache
files (Red Hat Linux 8):
/etc/init.d/httpd/conf/httpd.conf
-configuration file
/var/www/html
- index.html, web pages
/etc/rc3.d/S85httpd
-to start Apache at boot time
/var/log/httpd
-error logs
|