LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-11-2010, 01:02 AM   #1
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Rep: Reputation: 37
My Server’s Web Root Directory(Apache)?


Hi guys i m running a linux server with following os.
Quote:
uname -o
GNU/Linux
lsb_release -a
LSB Version: :core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: EnterpriseEnterpriseAS
Description: Enterprise Linux Enterprise Linux AS release 4 (October Update 7)
Release: 4
Codename: OctoberUpdate7
Thanks in advance.
I m running following Apache web server version.
Quote:
httpd -v
Server version: Apache/2.0.52
Server built: Jun 11 2008 19:01:13
How would i find the root directory of Apache server to put my web pages.
Please help.
 
Old 03-11-2010, 01:15 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Usually it's /var/www/html on RHEL/CentOS systems. But to find out for sure you'd look for the DocumentRoot directive in the httpd.conf file (in /etc/httpd/conf in a standard RHEL/CentOS install.
 
1 members found this post helpful.
Old 03-11-2010, 01:24 AM   #3
pinga123
Member
 
Registered: Sep 2009
Posts: 684

Original Poster
Blog Entries: 2

Rep: Reputation: 37
Quote:
Originally Posted by btmiller View Post
Usually it's /var/www/html on RHEL/CentOS systems. But to find out for sure you'd look for the DocumentRoot directive in the httpd.conf file (in /etc/httpd/conf in a standard RHEL/CentOS install.
In my case its
Quote:
DocumentRoot "/var/www/html"
Thanks .
There are no files in /var/www/html directive.
However i would like create a simple php page and host it on my machine.
Correct me if i m wrong.
1) create a php file say abc.php.
2) Copy it to /var/www/html directory.
3) restart the web server(tomcat).(kindly provide the command if any).
4) access it through url http://localhost:8080/abc.php

Last edited by pinga123; 03-11-2010 at 01:26 AM.
 
Old 03-11-2010, 01:48 AM   #4
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
Quote:
restart the web server
why?
 
Old 03-11-2010, 02:21 AM   #5
pinga123
Member
 
Registered: Sep 2009
Posts: 684

Original Poster
Blog Entries: 2

Rep: Reputation: 37
Quote:
Originally Posted by Web31337 View Post
why?
I dont know the process .i m just evaluating whether my steps are right or not?
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache and user web folder under account directory elimq Linux - Server 2 10-27-2009 08:07 AM
web file viewer for apache based web server? zerobane Linux - Server 8 03-11-2009 05:43 AM
Web Dir: Can someone look at everything in a directory on my web server? RHLinuxGUY Linux - Security 4 04-13-2007 05:09 PM
apache root directory thegooch49 Linux - Newbie 5 07-28-2004 11:50 AM
setting up password protected web forms on an apache web server AZDAVE Linux - Security 3 07-07-2004 12:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration