Apache2 Problem

Asked by tombelcher7

I have set up apache2 on Ubuntu Server 7.10 using sudo apt-get install apache2. It all installed ok and i tested by going to 127.0.0.1. I have created a replacement of the default virtual host called Intranet which is a duplication of the default virtual host except it points at /var/www/Intranet. After this I ran the following command to enable the site:

sudo a2dissite default && sudo a2ensite Intranet [OK]
Site Intranet installed; run /etc/init.d/apache2 reload to enable.

I then reloaded as suggested, I also ran an apache2 restart. [OK]

However the index.html file is being opened perfectly fine and the main.css is rendering the page properly but all of my graphics and flash are stored in their respective folders:

/flash /images

but basically all of the files not placed directly within the Intranet folder are not being displayed. This is giving me the vibe that it's a permissions problem; So I subsequently ran the following command:

sudo chmod -R +r /var/www/Intranet

which to my understanding should give read permissions to all files/folders contained within Intranet, but still even after apache2 restart it is not giving access to these folders.

What am I doing wrong? Can anyone help?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Eric Cohen (eirc) said :
#1

are you sure you changed both the DocumentRoot /var/www/ line and <Directory /var/www/> to point to /var/www/Intranet? and make sure you dont have any case-sensitivity errors in the path

Revision history for this message
tombelcher7 (tombelcher7) said :
#2

<Directory /var/www/> had not been specified properly I changed this to point to /var/www/Intranet and saved it, reloaded/restarted apache2 but still missing images / flash banner.

Below is a snippet from the Intranet virtual host file from within sites-available:

NameVirtualHost *
<VirtualHost *>
 ServerAdmin webmaster@localhost

 DocumentRoot /var/www/Intranet
 <Directory />
  Options FollowSymLinks
  AllowOverride None
 </Directory>
 <Directory /var/www/Intranet>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride None
  Order allow,deny
  allow from all
  # This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                #RedirectMatch ^/$ /apache2-default/
 </Directory>

But basically still having problems......

Revision history for this message
Eric Cohen (eirc) said :
#3

maybe those directories don't have excecute permissions?

try this:
sudo chmod -R +rx /var/www/Intranet

also paste the output of
ls -lR /var/www/
(this may need a sudo if permissions are not ok)

Can you help with this problem?

Provide an answer of your own, or ask tombelcher7 for more information if necessary.

To post a message you must log in.