logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Alias directive warning
Author
athena



Joined: 22 Jul 2015
Posts: 5
Location: USA, Princeton

PostPosted: Wed 22 Jul '15 18:03    Post subject: Alias directive warning Reply with quote

Hello,

I am getting a warning when I restart apache2 under Debian (Raspbian). I am not sure where else the conflicting alias is created. I am new to Apache.
Quote:

service apache2 restart
[....] Restarting web server: apache2[Wed Jul 22 11:41:38 2015] [warn] The Alias directive in /etc/apache2/conf.d/owncloud.conf at line 1 will probably never match because it overlaps an earlier Alias.

The contents of the "/etc/apache2/conf.d" folder is:
Quote:

drwxr-xr-x 2 root root 4096 Jul 21 09:20 .
drwxr-xr-x 9 root root 4096 Jan 15 2015 ..
-rw-r--r-- 1 root root 269 Jul 23 2014 charset
-rw-r--r-- 1 root root 21 Dec 24 2014 fqdn
-rw-r--r-- 1 root root 3296 Jul 23 2014 localized-error-pages
-rw-r--r-- 1 root root 143 Jul 23 2014 other-vhosts-access-log
lrwxrwxrwx 1 root root 31 Jul 21 09:20 owncloud.conf -> ../conf-available/owncloud.conf
-rw-r--r-- 1 root root 98 Jul 21 09:19 owncloud-old.conf
-rw-r--r-- 1 root root 2590 Jul 23 2014 security

And the contents of the /etc/apache2/conf-available folder is:
Quote:

root@Raspberrypi-3:/etc/apache2/conf-available# ls -la
total 16
drwxr-xr-x 2 root root 4096 Jul 19 19:37 .
drwxr-xr-x 9 root root 4096 Jan 15 2015 ..
-rw-r--r-- 1 root root 379 Jul 17 14:39 owncloud.conf
-rw-r--r-- 1 root root 98 Jul 19 19:34 owncloud.conf.old

And the contents of the "owncloud.conf" where the alias is defined is:
Quote:

Alias /owncloud "/var/www/owncloud/"
<Directory "/var/www/owncloud">
Options +FollowSymLinks
AllowOverride All

<IfModule mod_dav.c>
Dav off
</IfModule>

SetEnv HOME /var/www/owncloud
SetEnv HTTP_HOME /var/www/owncloud
</Directory>

<Directory "/var/www/owncloud/data/">
# just in case if .htaccess gets disabled
Require all denied
</Directory>

Is the link in the "/etc/apache2/conf.d" causing the problem?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 23 Jul '15 11:44    Post subject: Reply with quote

I think it should be

Alias /owncloud "/var/www/owncloud" not Alias /owncloud "/var/www/owncloud/"

Yes you should move the owncloud-old.conf in /etc/apache2/conf.d to a backup folder
Back to top
athena



Joined: 22 Jul 2015
Posts: 5
Location: USA, Princeton

PostPosted: Thu 23 Jul '15 17:27    Post subject: Alias problem Reply with quote

hello James,

Thank you again. After I removed the owncloud-old.conf file, the warning has disappeared. But I am not sure how to change the existing wrong link to the one you are suggesting. Could you show me the steps please, since it was done by the installation script and I am a novice in Linux?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 24 Jul '15 17:50    Post subject: Re: Alias problem Reply with quote

Well there is a tutorial https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-debian-7

if you still have a question please ask again.
Back to top


Reply to topic   Topic: Alias directive warning View previous topic :: View next topic
Post new topic   Forum Index -> Apache