Forum     

Go Back   Digit Technology Discussion Forum > Community > Tutorials
Register FAQ Calendar Mark Forums Read

Tutorials This section offers tutorials and How to's on just about anything related to computers and IT. Note: All tutorials are courtesy the posters and not verified by Digit


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 25-09-2006, 12:05 AM   #1 (permalink)
String Phreak
 
mediator's Avatar
 
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,457
Wink Simple Apache Web Server on Linux!


HI,
This is a simple tutorial to get ur http server running with installed apache!
This covers 2 things
1. Problems dealt with getting apache running
2. making virtual hosts, "http://mediator" etc like the default "http://localhost"!


Part A - Setting up local host, getting defaults to run and dealing with problems

1. First of all u have to get the httpd daemon up and running.
Code:
/etc/init.d/httpd start
2. Next...open up the browser type "localhost" an enter. If its running with default page then ur blessed!
3. If problem start then check Selinux protection! U shud disable SELinux protection for httpd daemon! For fedora5 u can do that by "System->Administration->security level and firewall"
4. It shud work now! Proceed to step 2
5. Next if still it encounters problems, then check for path permission! and give the "Document root" path a permission of 755!

Code:
chmod 755 /whatever_path
Code:
chmod 755 /whatever_path/www
where www is the directory where ur html,php files exist!


Part B -Setting up simple Virtual hosts that can run on loopback

Now to make simple aliases that u can use to test ur project and sites workings!
1. Here's my code that u shud put append to ur httpd.conf file!
This works when u open up ur browser and type "http://mediator"!

Code:
# Virtual host mediator
<VirtualHost 127.0.0.2:80>
DocumentRoot /home/kareena/www
ServerName mediator
<Directory /home/kareena/www>
order allow,deny
allow from all
</Directory>
<Location /home/kareena/www>
order allow,deny
allow from all
</Location>
DirectoryIndex index.html index.htm index.shtml index.php
</VirtualHost>
Here kareena is the username of ur normal account, www is the directory where ur files(html,php etc) are and mediator is the name of the virtual host!

2. Next u shud proceed similarly like the stuff posted in Part A
3. One most important thing is "127.0.0.2" added here! Where will be this IP looked for? For simple loopback we have "/etc/hosts" file that keep telling the browsers that 127.0.0.1 is a loopback! All the Linux distros have this "127.0.0.1" entry in this file. But I was surprised to see that my previous Knoppix distro didnt had this entry because of which neither mah http server started nor the mysql database/daemon!
So append "127.0.0.2" at the end of "/etc/hosts".

The final file shud look something like this!

Code:
127.0.0.1 localhost.localdomain localhost Ozone
127.0.0.2               mediator
where mediator again is the name of the Virtual Host!



Well thats it for now ! If u have any further problem then the MODS will be happy to solve it for u !

All those who already know such stuff can stop making comments like "I Already know that " etc!
__________________
Bad Bad server.....No candy for u!

Last edited by mediator; 25-09-2006 at 12:21 AM.
mediator is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 26-01-2007, 08:50 PM   #2 (permalink)
In The Zone
 
Join Date: Oct 2006
Location: Jabalpur
Posts: 325
Default Re: Running Simple Apache Web Server on Linux!

can u please tell me for windows XP
boosters is offline  
Old 26-01-2007, 08:58 PM   #3 (permalink)
Google Bot
 
Pathik's Avatar
 
Join Date: Aug 2005
Posts: 9,772
Default Re: Running Simple Apache Web Server on Linux!

4 win xp try using xampp..
http://www.apachefriends.org/en/xampp.html
Pathik is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Tenida
- by clinton
- by Anorion

Advertisement




All times are GMT +5.5. The time now is 03:34 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2