PDA

View Full Version : [ubuntu] Forbidden You don't have permission to access / on this server.



EpicKris
December 25th, 2010, 02:15 AM
This is what I'm attempting to achieve:
example1.com > site1
example2.com > site 2

I've created the sites as virtual hosts:
/etc/apache2/sites-available/example1

<VirtualHost *:80>
ServerAdmin me@example1.com
ServerName example1.com
ServerAlias example1.com
DocumentRoot /home/me/Sites/example1/www
<Directory /home/kristian/Sites/example1/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>

The www folder has permissions 755, owner me and group me.
The index.html file has permissions 644, owner me and group me.

Visiting the sites shows:
http://example1.com/ & http://example1.com/index.html

Forbidden

You don't have permission to access / on this server.

Apache/2.2.14 (Ubuntu) Server at pluginstudios.co.uk Port 80

Without the virtual hosts the setup works fine.

Any suggestions please?

EpicKris
December 26th, 2010, 12:42 AM
Could any help? I've read a lot about this topic, but not sure what to do exactly…

CharlesA
December 26th, 2010, 01:50 AM
Are the user's home directories encrypted?

EpicKris
December 26th, 2010, 01:52 AM
Are the user's home directories encrypted?

Yes! Thank you! How do I stop that?

CharlesA
December 26th, 2010, 01:53 AM
You don't. You need to put the sites somewhere else. Normally they'd be in /var/www/somefolder

EpicKris
December 26th, 2010, 02:14 AM
You don't. You need to put the sites somewhere else. Normally they'd be in /var/www/somefolder

It wont allow me to create any files or folders in the /var/www directory.

CharlesA
December 26th, 2010, 02:16 AM
You need to have root permission to create files and folders there.

EpicKris
December 26th, 2010, 02:17 AM
You need to have root permission to create files and folders there.

Okay, thank you for the help, I'm certain this will solve my problem completely.

Vegan
December 26th, 2010, 03:46 AM
when you need root provileges, use the

sudo mkdir xxx

then your making a root owned folder

sudo chmod 777 xxx

EpicKris
December 26th, 2010, 03:47 AM
Unfortunately I restarted my server and I need to type a password before services start but don't have access to the machine physically right now.