Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Technical Support _ Serving website from an alias directory

Posted by: jd4840 Nov 11 2015, 11:45 AM

Hello.

The Backstory:
------
On my RasPi 2, all my html files and such live in directories inside my main /var/www directory and I guess are served from there via my virtual server.
/var/www/joomla or /var/www/webtrees, etc.
I recently installed monitorix.
Back when I was running Wheezie (Raspbian 7), programs like monitorix or cacti self-installed in their own subdirectories behind /var/www ----- /var/www/cacti, and /var/www/monitorix, etc.

The Problem:
------
Monitorix has put its html files in /var/lib/monitorix/www and I don't know how to access the monitorix web interface since it's not behind /var/www/monitorix

The Question:
------
How do I set up Apache 2.4.x to serve monitorix web pages from this newlocation while still serving my other files from /var/www, and why all the sudden do these things not install where they used to?
All the monitorix page says it now installs here to make it more FHS (Filesystem Hierarchy Standard) friendly. Not seeming too friendly right now. lol

I imagine an alias, symlink, or something may be in order. I just am not sure how to set it up.

Here is my first shot at it (it didn't work):
I added these lines to my apache2.conf file.
<Directory /var/lib/>
Options Indexes FollowSymLinks
AllowOverride none
Require all granted
</Directory>

and then went to my /etc/apache2/sites-available/000-default.conf file and added a second virtual host.
Here is what I had for my /var/www, so I added another setting for /var/lib below it.
<VirtualHost *:8015>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
------ here is what I added --------
<VirtualHost *:8015>
ServerAdmin webmaster@localhost
DocumentRoot /var/lib/
<Directory />
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>


so on my second try I created a brand new monitorix.conf file in sites-available, including the section above pointing to /var/lib/ but, still, Monitorix is not working.



Raspberry Pi 2; kernel: 4.1.11-v7+
Raspbian GNU/Linux 8.0 (jessie)
Apache/2.4.10 (Raspbian)

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)