Results 1 to 4 of 4

Thread: Apache2 HTTPD problem.. weird directory issue...

  1. #1
    Join Date
    Jul 2008
    Beans
    95
    Distro
    Ubuntu 12.04 Precise Pangolin

    Apache2 HTTPD problem.. weird directory issue...

    So i have apache2, php5, mysql, phpmyadmin running on my home PC for my personal php projects and web development projects but I am running into a weird issue with access to the directories (in the Browser, NOT the filesystem)

    Code:
    <img src="/images/another/image.jpg" />
    will not show an image even though the image exists. When i try to go to
    http://localhost/images/another/ I get an error saying I do not have access to view or access that folder.. my apache config is nothing special, if i remember correctly it is the default config (other than adding support for phpmyadmin.

    example of my problem: (this is from the browser -- when viewing the website NOT when im using a file system manager)
    /var/www/html/ - works/have access
    /var/www/html/images/ - works/have access
    /var/www/html/images/another/ - exists, but do not have access
    /var/www/html/images/another/image.jpg - exists but do not have access
    /var/www/html/js - works/aave access
    /var/www/html/js/jquery/ - exists but do not have access
    /var/www/html/js/jquery/jquery.js - exists but do not have access


    can someone please help?

  2. #2
    Join Date
    Jul 2008
    Beans
    95
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Apache2 HTTPD problem.. weird directory issue...

    there are no .htaccess files in any of the subdirecories

  3. #3
    Join Date
    Feb 2013
    Beans
    9

    Re: Apache2 HTTPD problem.. weird directory issue...

    I'm not an expert with this, but I'll lend my help, as I've recently overcome similar issues.
    Can you post the contents of your sites-enabled configuration in the /etc/apache2/sites-enabled dir?

  4. #4
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    11,250
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Apache2 HTTPD problem.. weird directory issue...

    If this is a vanilla installation, the default DocumentRoot is /var/www, not /var/www/html. /var/www/html is the default on RedHat and its derivatives like CentOS. Either move everything in /var/www/html into /var/www, or change the DocumentRoot directive in /etc/apache2/sites-available/default to /var/www/html, and change the associated <Directory> directive as well. Then restart Apache with "sudo service apache2 restart".
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •