Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
> Serving website from an alias directory, How do i add an alias or symlink to apache 2.4.x
post Nov 11 2015, 11:45 AM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 1
Joined: 10-November 15
Member No.: 18,969


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

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
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
------ here is what I added --------
<VirtualHost *:8015>
ServerAdmin webmaster@localhost
DocumentRoot /var/lib/
<Directory />
Require all granted
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
#Include conf-available/serve-cgi-bin.conf

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)
Go to the top of the page
+Quote Post

Posts in this topic
- jd4840   Serving website from an alias directory   Nov 11 2015, 11:45 AM

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 17th October 2017 - 12:10 PM