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

24th November 2008, 04:47 PM
|
|
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
|

24th November 2008, 04:53 PM
|
 |
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.
|

24th November 2008, 04:58 PM
|
|
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
|

24th November 2008, 05:00 PM
|
 |
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:
|

24th November 2008, 05:07 PM
|
|
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
|

24th November 2008, 05:05 PM
|
|
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.
|

24th November 2008, 05:17 PM
|
 |
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:
|

24th November 2008, 05:26 PM
|
|
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.
|

24th November 2008, 05:38 PM
|
 |
Registered User
|
|
Join Date: Aug 2007
Location: The Bay, Florida
Age: 31
Posts: 194

|
|
cd to the /home/chris/public directory.
Then try
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:
|

24th November 2008, 05:52 PM
|
|
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]#
|

24th November 2008, 05:58 PM
|
 |
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:
|

24th November 2008, 06:15 PM
|
|
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
|

24th November 2008, 06:50 PM
|
 |
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
|

24th November 2008, 07:07 PM
|
 |
Registered User
|
|
Join Date: Aug 2007
Location: The Bay, Florida
Age: 31
Posts: 194

|
|
Quote:
Originally Posted by EnglandA
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:
|

24th November 2008, 07:10 PM
|
|
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
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 14:53 (Saturday, 25-05-2013)
|
|
 |
 |
 |
 |
|
|