Solved

Apachi Web Server, where are web pages stored?

Posted on 1998-09-10
7
307 Views
Last Modified: 2013-12-15
I'd like to know the path to where web pages are stored on the Red Hat 5.1 Apachi installation. I would also like to know something about the permissions, storage, and handling of web content. Should the files be seperated into directories, such as jpg's and gif's into seperate directories from html. What permissions do the files need, who needs to own them, or does it matter?  I'm just interested in getting enough info to start to use it as an Intranet web server and don't want any surprises. Please don't post your comments as an answer. I will award the question to what I view as the best answer and then ask for it to be reposted.
0
Comment
Question by:joe_massimino
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 3

Expert Comment

by:marcelofr
ID: 1630747
The default directory for .html docs is "/home/httpd/html" but you can override it in your /etc/httpd/conf/srm.conf in the DocumentRoot entry. (read /etc/httpd/conf/*.conf, they have VERY detailed documentation). You can also point your favourite browser to http://your_host/manual/ (in bash: "lynx http://localhost/manual/")

About permissions, the files need to be readable by everybody ("chmod -R +r /home/httpd/html") for the server to work. I'd suggest you to:
1) create a special group ("groupadd web")
2) add every login who should put files in your web site to that group ("usermod -G web,listOfPreviousAditionalGroups user")
3) change group of html dir ("chgrp web /home/httpd/html")
4) setgid same dir ("chmog g+s /home/httpd/html")

With redhat default permissions you won't have problems sharing web site administration among several users.

About directories: this is a matter of how you feel more confortable with files/dirs. For the web server there's not much difference between html source and images (unless you user an embedded languaje in your pages). Subdirectories may help you to have webmasters with very specific responsibilities...

Good luck
0
 
LVL 3

Expert Comment

by:marcelofr
ID: 1630748
Sorry:
4) setgid same dir ("chmog g+s /home/httpd/html") should read: "chmod g+s ..."
0
 
LVL 6

Author Comment

by:joe_massimino
ID: 1630749
Thanks for the quick response. I will review the info you have here and see how far it gets me.
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 6

Author Comment

by:joe_massimino
ID: 1630750
Go ahead and repost this as an answer.  Thanks
0
 
LVL 3

Accepted Solution

by:
marcelofr earned 120 total points
ID: 1630751
enjoy Linux...
0
 
LVL 6

Author Comment

by:joe_massimino
ID: 1630752
Can you shed any lite on making my public_html directories work with the proper permissions.  I tried    chmod 644 public_html
but that didn't help me any.  When I browse the linux box, running apachi, I just get the default apachi file, not the users public_html, no matter how I type the URL.  If you like, I can post this as another question.
0
 
LVL 3

Expert Comment

by:marcelofr
ID: 1630753
In the default configuration, your web server is running as "nobody" so it needs read permissions in the filesin public_html, also you need "eXecution" permission for "other" in ALL of the subdirectories involved: for joeuser you'll need:

chmod +x /home
chmod +x /home/joeuser
chmod +x /home/joeuser/public_html
chmod +r /home/joeuser/public_html/*

and last but not least, in your /etc/httpd/conf/srm.conf you need the "magic entry: "UserDir public_html".

Given all this conditions and having HUP'ed (killall -v -1 `cat /var/run/httpd.pid`), you can access this as:

http://web.server.com/~joeuser/page.html

Good luck
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux Mailserver setup & redundancy 2 83
exchange, squid, proxy, linux 6 44
Windows 10 linux VM 18 43
NFS v4 7 23
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
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.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

730 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