Results 1 to 10 of 11

Thread: Adding a Web Site to Apache on Local Development Server (Ubuntu)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    Looks good. That is because DirectoryIndex is not set properly. So Apache don't know index.html should be displayed..

    Can you make index.php and see if it works ?
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  2. #2
    Join Date
    Nov 2009
    Posts
    76,596

    Default

    i got same result


  3. #3
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    Post result of following command

    Code:
    cat /etc/apache2/mods-available/dir.conf
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  4. #4
    Join Date
    Nov 2009
    Posts
    76,596

    Default


  5. #5
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    That looks good. Not sure why it is not showing index.php Anyway lets try following

    Update your VirtualHost entry in ~/conf/vhosts.conf as follows


    Code:
    <VirtualHost 127.0.0.1:80>
        ServerName imagehostnow.dev
        SetEnv APP_ENV "dev"
        DocumentRoot /home/YOUR_USER_NAME_HERE/www/imagehostnow.com/public
        CustomLog ${APACHE_LOG_DIR}/imagehostnow.dev.log combined
        DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
        <Directory "/home/YOUR_USER_NAME_HERE/www/imagehostnow.com/public">
            Options All
            AllowOverride All
            Require all granted
            Order allow,deny
            allow from all
        </Directory>
    </VirtualHost>
    The change is, we added the line

    Code:
        DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
    Below CustomLog line.


    Restart Apache. Go to web site and see if it shows index.php file instead of directory listing.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  6. #6
    Join Date
    Nov 2009
    Posts
    76,596

    Default

    I have done the same, restarted apache.But still same.

  7. #7
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    Run following command and post result

    Code:
    sudo a2enmod dir
    Also, restart apache, see if problem fixed.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

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
  •