Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 24th November 2008, 04:47 PM
chrisk Offline
Registered User
 
Join Date: Nov 2008
Location: Surrey, BC
Posts: 33
Apache configuration

Hello all,

I need to learn PHP and to that end I installed FC9 last Saturday on a dual boot machine.
My intranet is properly configured: I can browse Windows shares on the other machines on my network and I have read/write accessibility to the Linux box from the Windows boxes.

The default Apache installation works properly as well, I get the feather on both the local machine and on the other machines on the network.

My problem arises when I edit the httpd.conf file: I edited it from
DocumentRoot "/var/www/html" to read DocumentRoot "/home/chris/public/www" and changed
<Directory "/var/www/html"> to <Directory "/home/chris/public/www">

Firefox can't establish a connection with this configuration.

The question then: what do I need to do the have Apache serve up pages from the /home/chris/public/www folder?

TIA

Chris
Reply With Quote
  #2  
Old 24th November 2008, 04:53 PM
biggsk's Avatar
biggsk Offline
Registered User
 
Join Date: Aug 2007
Location: The Bay, Florida
Age: 31
Posts: 194
Check the permissions for "/home/chris/public/www"
__________________
Dell Inspirion 1520
Intel® Pentium® Dual-Core Mobile Processor T2370
4GB, DDR2, 667MHz
250GB 5400RPM SATA Hard Drive
Intel Integrated Graphics Media Accelerator 3100
Dell Wireless 1395 802.11g Mini Card

My tech blog(s):
http://blog.biggsenterprises.net

:eek:

Last edited by biggsk; 24th November 2008 at 05:00 PM.
Reply With Quote
  #3  
Old 24th November 2008, 04:58 PM
chrisk Offline
Registered User
 
Join Date: Nov 2008
Location: Surrey, BC
Posts: 33
Thanks for your quick response, biggsk.

I should have stated also that I am a total new to Linux, so how do I check and change permissions on files/folders?

Chris
Reply With Quote
  #4  
Old 24th November 2008, 05:00 PM
biggsk's Avatar
biggsk Offline
Registered User
 
Join Date: Aug 2007
Location: The Bay, Florida
Age: 31
Posts: 194
Code:
chmod 755 /home/chris/public/www
Then restart apache

Code:
service httpd restart
__________________
Dell Inspirion 1520
Intel® Pentium® Dual-Core Mobile Processor T2370
4GB, DDR2, 667MHz
250GB 5400RPM SATA Hard Drive
Intel Integrated Graphics Media Accelerator 3100
Dell Wireless 1395 802.11g Mini Card

My tech blog(s):
http://blog.biggsenterprises.net

:eek:
Reply With Quote
  #5  
Old 24th November 2008, 05:07 PM
chrisk Offline
Registered User
 
Join Date: Nov 2008
Location: Surrey, BC
Posts: 33
Thanks again biggsk, but this is what happened when I pasted your command into a terminal window:

[chris@webserver ~]$ su
Password:
[root@webserver chris]# chmod 755 /home/chris/public/www
chmod: cannot access `/home/chris/public/www': No such file or directory
[root@webserver chris]# exit
exit
[chris@webserver ~]$ chmod 755 /home/chris/public/www
chmod: cannot access `/home/chris/public/www': No such file or directory
[chris@webserver ~]$

Chris
Reply With Quote
  #6  
Old 24th November 2008, 05:05 PM
domg472 Offline
SELinux Contributor
 
Join Date: May 2008
Posts: 621
less /var/log/httpd/error_log should show you any apache errors
you will also have issues with SELinux. those will be logged in /var/log/audit/audit.log
you can see man http_selinux for SELinux settings regarding apache
also apache must be able to access that location

Your setup is not a recommended one.

you could try something like this:

mkdir /www
/usr/sbin/semanage fcontext -a -t httpd_sys_content_t "/www(/.*)?"
/sbin/restorecon -R -v /www
chown -R chrisk:apache /www
chmod -R g+xs /www
cd /home/chrisk
ln -s /www www
and then edit the documentroot to point to /www

not sure if this will work or even recommended.

or you could just leave the system documentroot default and configure a userdir

apache.org has very good documentation.
__________________
Come join us on #fedora-selinux on irc.freenode.org
http://docs.fedoraproject.org/selinu...ide/f10/en-US/
Reply With Quote
  #7  
Old 24th November 2008, 05:17 PM
biggsk's Avatar
biggsk Offline
Registered User
 
Join Date: Aug 2007
Location: The Bay, Florida
Age: 31
Posts: 194
chrisk,
Does the /home/chris/public/www directory exist?
__________________
Dell Inspirion 1520
Intel® Pentium® Dual-Core Mobile Processor T2370
4GB, DDR2, 667MHz
250GB 5400RPM SATA Hard Drive
Intel Integrated Graphics Media Accelerator 3100
Dell Wireless 1395 802.11g Mini Card

My tech blog(s):
http://blog.biggsenterprises.net

:eek:
Reply With Quote
  #8  
Old 24th November 2008, 05:26 PM
chrisk Offline
Registered User
 
Join Date: Nov 2008
Location: Surrey, BC
Posts: 33
Yes it does, and it is clearly accessible from my Windows box.

Chris

Last edited by chrisk; 24th November 2008 at 05:28 PM.
Reply With Quote
  #9  
Old 24th November 2008, 05:38 PM
biggsk's Avatar
biggsk Offline
Registered User
 
Join Date: Aug 2007
Location: The Bay, Florida
Age: 31
Posts: 194
cd to the /home/chris/public directory.
Then try
Code:
chmod 755 www
Also paste the output of:
Code:
ls -l /home/chris/public
__________________
Dell Inspirion 1520
Intel® Pentium® Dual-Core Mobile Processor T2370
4GB, DDR2, 667MHz
250GB 5400RPM SATA Hard Drive
Intel Integrated Graphics Media Accelerator 3100
Dell Wireless 1395 802.11g Mini Card

My tech blog(s):
http://blog.biggsenterprises.net

:eek:
Reply With Quote
  #10  
Old 24th November 2008, 05:52 PM
chrisk Offline
Registered User
 
Join Date: Nov 2008
Location: Surrey, BC
Posts: 33
[chris@webserver ~]$ ls -l /home/chris/public
ls: cannot access /home/chris/public: No such file or directory
[chris@webserver ~]$ su
Password:
[root@webserver chris]# ls -l /home/chris/public
ls: cannot access /home/chris/public: No such file or directory
[root@webserver chris]#
Reply With Quote
  #11  
Old 24th November 2008, 05:58 PM
biggsk's Avatar
biggsk Offline
Registered User
 
Join Date: Aug 2007
Location: The Bay, Florida
Age: 31
Posts: 194
Ok.
It looks like /home/chris/public doesn't exist.
You will need to create the directories before you can chmod them.

In the /home/chris directory:
Code:
mkdir public
cd public

mkdir www
Then try chmod 755 /home/chris/public/www, and restarting apache.
__________________
Dell Inspirion 1520
Intel® Pentium® Dual-Core Mobile Processor T2370
4GB, DDR2, 667MHz
250GB 5400RPM SATA Hard Drive
Intel Integrated Graphics Media Accelerator 3100
Dell Wireless 1395 802.11g Mini Card

My tech blog(s):
http://blog.biggsenterprises.net

:eek:
Reply With Quote
  #12  
Old 24th November 2008, 06:15 PM
chrisk Offline
Registered User
 
Join Date: Nov 2008
Location: Surrey, BC
Posts: 33
biggsk, it does exist, the view from my Windows box clearly shows that.

Chris
Reply With Quote
  #13  
Old 24th November 2008, 06:50 PM
EnglandA's Avatar
EnglandA Offline
Registered User
 
Join Date: May 2005
Location: UK
Posts: 250
You are aware that Linux is case sensitive?

/home/chris/public/www
is not
/home/chris/Public/www
__________________
Registered Linux User #221895
Reply With Quote
  #14  
Old 24th November 2008, 07:07 PM
biggsk's Avatar
biggsk Offline
Registered User
 
Join Date: Aug 2007
Location: The Bay, Florida
Age: 31
Posts: 194
Quote:
Originally Posted by EnglandA View Post
You are aware that Linux is case sensitive?

/home/chris/public/www
is not
/home/chris/Public/www
Thanks for pointing that out.

chrisk,

Code:
chmod 755 /home/chris/Public/www
Then restart apache.
__________________
Dell Inspirion 1520
Intel® Pentium® Dual-Core Mobile Processor T2370
4GB, DDR2, 667MHz
250GB 5400RPM SATA Hard Drive
Intel Integrated Graphics Media Accelerator 3100
Dell Wireless 1395 802.11g Mini Card

My tech blog(s):
http://blog.biggsenterprises.net

:eek:
Reply With Quote
  #15  
Old 24th November 2008, 07:10 PM
chrisk Offline
Registered User
 
Join Date: Nov 2008
Location: Surrey, BC
Posts: 33
Thanks EnglandA,

I caught that a few minutes ago, so I redid the chmod 755 on the Public/www folder, edited the httpd.conf file, and rebooted, but the results are the same, Apache is still not serving up the index.html file in that folder.

Chris
Reply With Quote
Reply

Tags
apache, configuration

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SELinux/Apache Configuration Madeye Servers & Networking 1 23rd February 2011 10:48 PM
SSL and Apache configuration problem rawand Servers & Networking 2 2nd September 2009 09:05 AM
cgi-perl and apache configuration venu Programming & Packaging 2 14th November 2008 12:51 PM
Apache configuration question leaded Servers & Networking 2 30th August 2006 08:05 PM


Current GMT-time: 14:53 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

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

FedoraForum is Powered by RedHat