Solved

RedHat and Web Server File Locations

Posted on 2012-04-02
2
619 Views
Last Modified: 2012-04-02
I have a RedHat web server that is running a website.  How do i find the locate of the web site files?
0
Comment
Question by:deklinm
2 Comments
 
LVL 30

Accepted Solution

by:
Kerem ERSOY earned 500 total points
ID: 37797479
Hi,

By dedault the document root is located under  /var/www/html for RedHat servers. If you want to see the actual location you can query the contents of your /etc/httpd/conf/httpd.conf file for DocumentRoot variable. such as:


[root@xxxx ~]# grep DoscumentRoot /etc/httpd/conf/httpd.conf 

Open in new window


The output should be something similar to this:

# DocumentRoot: The directory out of which you will serve your
DocumentRoot "/var/www/html"
# This should be changed to whatever you set DocumentRoot to.

Open in new window


Cheers,
K.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37797484
That depends on how the web server is set up.  The Virtual Hosts settings can place the web files almost anywhere and if you have user directory hosting enabled, then each user under /home could have their own web site, usually in /home/~user/public_html .  Some more info here:  http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/3/html/System_Administration_Guide/s1-httpd-virtualhosts-settings.html
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now