Page 1 of 1

Ubuntu httpd.conf

Posted: Thu May 24, 2007 12:15 am
by nwp
Yesterday I've Installed Ubuntu on my PC (Dual boot with Win XP) In Win XP I had my D drive as DocumentRoot (htdocs folder). Now I've installed XAMPP on Ubuntu. Everything works fine upto here.
I am trying to use the same htdocs folder(D drive) as my DocumentRoot in ubuntu also.
So I opend the /opt/lampp/etc/httpd.conf
And changed DocumentRoot to

Code: Select all

DocumentRoot "/media/HTTP/http/xampp/htdocs"
then I've restarted Apache
But when I am entering http://localocalhost through my browser its showing me
Forbidden

You don't have permission to access / on this server.
-------------------------------------------------------------------------------------------------------------------------
Apache/2.2.4 (Unix) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e PHP/5.2.1 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7 Server at localhost Port 80
Its worth to say that I can Read / write files on "/media/HTTP/http/xampp/htdocs" through file browser of ubuntu.
I've also tried http://localhost/index.php but same thing happen's again.
And I am logged in as a root user.

Posted: Thu May 24, 2007 12:56 am
by timvw
You are logged in as root (which is not a good idea), but your webserver is not running as root (and just like you, shouldn't be either)...

I'd recommend that you look into the rights that are given when the medium is mounted (/etc/fstab)...

Posted: Thu May 24, 2007 1:03 am
by nwp
No I cant start XAMPP server If I dont login as root.[quote]I'd recommend that you look into the rights that are given when the medium is mounted (/etc/fstab)...[/quoye] I dont know how to do it.
This is my fstab.

Code: Select all

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda10
UUID=19520351-6199-4893-b7be-e05eaae26c6c /               ext3    defaults,errors=remount-ro 0       1
# /dev/sda11
UUID=9b4c6388-2d41-4e18-83aa-a20443860c3e none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0

Posted: Thu May 24, 2007 4:04 am
by timvw
nwp wrote:No I cant start XAMPP server If I dont login as root.
sudo /usr/sbin/xamp (or wherever your xamp startup script lives...)
I'd recommend that you look into the rights that are given when the medium is mounted (/etc/fstab)..
I dont know how to do it.
http://www.ubuntugeek.com/mount-your-wi ... table.html