2

About 2 months ago, I set up an app on a DigitalOcean server using Ubuntu 14.04 and Apache. Initially this worked great, but for about 2 weeks now, when I try to access the app at the usual domain, I get sent to an index page, without having changed anything in the server. This index page leads me to believe the DocumentRoot is now pointing to /var/www instead of /var/www/html, where all my files are. I've searched online for an answer, but all of my configuration files say that the DocumentRoot is /var/www/html.

apache2/sites-available/sendy:

DocumentRoot /var/www/html

    <Directory /var/www/html/>
        DirectorySlash Off
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>

/etc/apache2/sites-available/000-default.conf.dpkg-dist:

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

/var/www/html/.htaccess:

Options +FollowSymLinks
Options -Multiviews

RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^([a-zA-Z0-9-]+)$ $1.php [L]

# Link tracker
RewriteRule ^l/([a-zA-Z0-9/]+)$ l.php?i=$1 [L]

# Open tracker
RewriteRule ^t/([a-zA-Z0-9/]+)$ t.php?i=$1 [L]

# Web version
RewriteRule ^w/([a-zA-Z0-9/]+)$ w.php?i=$1 [L]

# unsubscribe
RewriteRule ^unsubscribe/(.*)$ unsubscribe.php?i=$1 [L]

# subscribe
RewriteRule ^subscribe/(.*)$ subscribe.php?i=$1 [L]

Does anyone have an idea what might be causing this?

urs
  • 21
  • 3
  • Did you check the Apache logs? – wcomnisky Jan 12 '17 at 23:23
  • @wcomnisky I took a look but I couldn't find anything worthwhile. Are you referring to the access logs or the error logs? – urs Jan 13 '17 at 00:46
  • It does not look like an error so the access log might give us a clue.. Did you try to delete the .htaccess file? – wcomnisky Jan 13 '17 at 01:27
  • Can you enable mod_info? It can show you the configuration that is loaded and you can search there for the DocumentRoot. – yakatz Jan 13 '17 at 02:24
  • Try commenting out `DirectorySlash off`, in case that is the cause, which it may be. –  Jan 13 '17 at 04:07

0 Answers0