Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27

Thread: ubuntu server apache 2 wont load pictures from sub directory

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

    Re: ubuntu server apache 2 wont load pictures from sub directory

    There are two levels of security involved when using Apache. One is the OS permissions on the directory where the files are stored. However Apache itself restricts what directories may be listed and which files may be displayed. The default is very restrictive; only /var/www and its subdirectories can be displayed.

    The OP hasn't really told us where the files are located or the contents of the relevant <Directory> stanza in the configuration file for this directory. Unless there is an "Options Indexes" entry in this stanza, the directory cannot be listed except via an "index" file like "index.html" or "index.php". OP, I suggest looking at this explanation of the Options directive.
    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

  2. #12
    Join Date
    Mar 2006
    Location
    127.0.0.1
    Beans
    198

    Re: ubuntu server apache 2 wont load pictures from sub directory

    Hmm I have all my data in a subdirectory under /var/www/ziggy-dog.eu/public_html/

    Where should I go to add the configuration for that directory and what should I call that directory in the configuration
    my images live at /var/www/ziggy-dog.eu/public_html/images/

    I am not really that good with apache, and find the documentation really messy.

  3. #13
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,050
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: ubuntu server apache 2 wont load pictures from sub directory

    Page source shows: http://ziggy-dog.eu/images/clothing.jpg

    What is your root web directory set to in your apache configuration file?

    Is /var/www set to root directory or is /var/www/public_html set to root directory?
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  4. #14
    Join Date
    Nov 2007
    Location
    Sitka Alaska
    Beans
    94
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: ubuntu server apache 2 wont load pictures from sub directory

    Quote Originally Posted by tgalati4 View Post
    Page source shows: http://ziggy-dog.eu/images/clothing.jpg

    What is your root web directory set to in your apache configuration file?

    Is /var/www set to root directory or is /var/www/public_html set to root directory?
    just to clarify they're talking about DocumentRoot

    can you print the information for your virtualhost

    Code:
    cat /etc/apache2/sites-enabled/site
    Where site=the name of your virtualhost (if you haven't modified it you should have a file named "000-default"

    e.g.
    Code:
    cat /etc/apache2/sites-enabled/000-default
    Ubuntu Server User - OSX and Windows Desktop

  5. #15
    Join Date
    Mar 2006
    Location
    127.0.0.1
    Beans
    198

    Re: ubuntu server apache 2 wont load pictures from sub directory

    <VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    </VirtualHost>


    is the in the /etc/apache2/sites-enabled/000-default.

  6. #16
    Join Date
    May 2007
    Location
    NY's first capital
    Beans
    2,633
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: ubuntu server apache 2 wont load pictures from sub directory

    Quote Originally Posted by ThaDoctor99 View Post
    <VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    </VirtualHost>


    is the in the /etc/apache2/sites-enabled/000-default.
    This does not jive with the directory in question.

    Quote Originally Posted by ThaDoctor99 View Post
    Hmm I have all my data in a subdirectory under /var/www/ziggy-dog.eu/public_html/

    Where should I go to add the configuration for that directory and what should I call that directory in the configuration
    my images live at /var/www/ziggy-dog.eu/public_html/images/

    I am not really that good with apache, and find the documentation really messy.
    Have you added your own virtualhost file?

    Please post output:

    Code:
    ls /etc/apache2/sites-enabled
    Please read examples offered. Often times members offer help in the form of generic info, which in turn you need to apply to your specific situation.

    Please also post output of:

    Code:
    ls -al /var/www/ziggy-dog.eu
    Nothing is ever easy, but if it is difficult you must be doing it wrong.

  7. #17
    Join Date
    Mar 2006
    Location
    127.0.0.1
    Beans
    198

    Re: ubuntu server apache 2 wont load pictures from sub directory

    In /var/www/ziggy-dog
    there is a error.log (which should not be there.)
    and then directories public_html and logs, with 744

    in the other there is only 000-default and ziggy-dog.eu

  8. #18
    Join Date
    May 2007
    Location
    NY's first capital
    Beans
    2,633
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: ubuntu server apache 2 wont load pictures from sub directory

    Quote Originally Posted by ThaDoctor99 View Post
    In /var/www/ziggy-dog
    there is a error.log (which should not be there.)
    and then directories public_html and logs, with 744

    in the other there is only 000-default and ziggy-dog.eu
    I don't know why you're reluctant to post what is requested. Perhaps someone else can help you with their crystal ball.
    Nothing is ever easy, but if it is difficult you must be doing it wrong.

  9. #19
    Join Date
    Mar 2006
    Location
    127.0.0.1
    Beans
    198

    Re: ubuntu server apache 2 wont load pictures from sub directory

    I just have a little problems with getting a listing...
    Out of the vps.

  10. #20
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,050
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: ubuntu server apache 2 wont load pictures from sub directory

    Fix your DocumentRoot.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

Page 2 of 3 FirstFirst 123 LastLast

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
  •