Ubuntu httpd.conf

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
nwp
Forum Contributor
Posts: 105
Joined: Sun Feb 04, 2007 12:25 pm

Ubuntu httpd.conf

Post 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.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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)...
nwp
Forum Contributor
Posts: 105
Joined: Sun Feb 04, 2007 12:25 pm

Post 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
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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
Post Reply