DIYMacServer » Apache

4 posts

Missing images and links on index.htm

started at 28 Nov 2009
started by DukeBedford
last reply from richard
  • DukeBedford
    28 Nov 2009
    #

    I'm moving a virtual host from an old Webstar server to Apache2 on 10.5.8. I've got this in the httpd-vhosts.conf file:

    <Directory "/Users/ilex/Sites/springrock/">
    	Options Indexes MultiViews FollowSymLinks
    	AllowOverride All
    	Order allow,deny
    	Allow from all
    </Directory>

    Other directives include

    NameVirtualHost *:80
    Include /private/etc/apache2/extra/httpd-vhosts.conf

    The development directory for this site is "Users/ilex/Documents/Springock". The site checks out fine using Dreamweaver CS3, but when it is uploaded to the indicated directory, Apache serves pages that include only the hard coded text on the page. The images (from a subdirectory "images") and links "at the same level as "index.htm" in the HTML that is served, but are broken or missing. There must be some Apache directive that I'm not using, or am using wrong, that prevents these images and links from being found.

    I have
    127.0.0.1 springrock.net (in the hosts database)

    Any suggestions would be appreciated!

  • 30 Nov 2009
    #

    Hi, if you've compiled Apache yourself using the DIYMacServer layout the configuration is located in /private/etc/httpd/

    There could be a problem that /Users/ilex/Sites/* is used in the User sites settings. It is better to locate a test site in /Library/Webserver/Documents/sitename

  • DukeBedford
    30 Nov 2009
    #

    Richard: You refer to this as a "test site". What I'm trying to do is develop and test in Users/ilex/Documents/*, then "upload" the site to Users/ilex/Sites/*. Is this not OK?

    I'm using the Apache2 that came with Leopard. I'm editing the configuration file in private/etc/apache2/httpd.conf. The vhosts.conf file is in private/etc/apache2/extra/httpd-vhosts.conf. Now that I'm probing around more deeply, I realize that there are multiple httpd.conf files in different locations -- I thought there was only one such file. Maybe I'm making changes in the wrong places?

  • 01 Dec 2009
    #

    If you are using the default apache server your usage of the files is correct.

    However the location of the sites you are using is used for personal sites which can be accessed via domain/~user.

    Normally for general sites when you use your computer as a server sites should be located in /Library/Webserver/Documents/sitename

    This is why you get the errors, the configuration for sites in your user directory is different in httpd.conf Look for the usage of username/Sites in the configuration files.

Reply

You must log in to post.