[Ubuntu-US-CA] Server 14.04 new VirtualHost
Scott DuBois
sdubois at linux.com
Sat Jul 19 02:03:31 UTC 2014
On 07/18/2014 06:33 PM, Sander van Zoest wrote:
> In apache 2.4 by default you need to whitelist the directories you want
> to allow access to outside of the default server root. You can do that
> by adding a directory block as follows:
>
> <Directory "/srv/www">
> Require all granted
> </Directory>
>
> The full details are at
> http://httpd.apache.org/docs/2.4/upgrading.html
>
> Linode has a good summary for common issues at
> https://library.linode.com/web-servers/apache/2.2-2.4-upgrade#sph_virtual-host-settings-updates
>
> I hope that helps,
>
> -- Sander
>
> On Jul 18, 2014 9:37 AM, "Scott DuBois" <sdubois at linux.com
> <mailto:sdubois at linux.com>> wrote:
>
> Hi All,
>
> Over the last few days I've been working on setting up a new VirtualHost
> inside Kubuntu 14.04 and been having difficulty getting any results
> outside of the /var/www directory.
>
> I've been playing around with LAMP stacks for a number of years as
> simple development platforms for HTML, CSS and MySQL projects but as I'm
> starting to learn Perl and thought I would set up CGI scripting to
> /var/www which is working great then got a "wild hair" and thought I
> would try setting up a new VirtualHost pointed to /srv for practice in
> going through the motions of getting this to work but I'm still getting
> permission errors.
>
> I did a2ensite which resolved just fine and chmod /srv to 755
> recursively as well as insuring all the files below are executable. My
> file inside /etc/apache2/sites-enabled (sym'd to sites-available) is set
> as such:
>
> <VirtualHost *:80>
> ServerName roguehorse
> ServerAdmin webmaster at localhost
> DocumentRoot /srv
> #ScriptAlias /cgi-bin/ /srv/cgi-bin/
> <Directory "/srv/cgi-bin">
> AllowOverride All
> Options ExecCGI Multiviews FollowSymLinks
> AddHandler cgi-script .cgi .pl .py
> Allow from all
> </Directory>
> </VirtualHost>
>
> This file was copied from the 000-default.conf file as per the
> instructions at https://help.ubuntu.com/14.04/serverguide/httpd.html
>
> I have definitely remembered to reset the server multiple times as well
> to make sure the changes have taken effect.
>
> If someone could help me out with what I'm doing wrong to get access to
> /srv through my loopback I would most grateful!
>
> Also, this is simply a localhost installation that doesn't see the
> outside but simply a platform for learning so strict permissions is not
> a big priority as much as just getting the process to work then go from
> there.
> --
> Scott DuBois
> President EBLUG
> BSIT Software Engineering
> Freenode: Roguehorse
>
> --
> Ubuntu-us-ca mailing list
> Ubuntu-us-ca at lists.ubuntu.com <mailto:Ubuntu-us-ca at lists.ubuntu.com>
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-ca
>
>
>
Good advice but both VirtualHosts are still pulling data from /var/www.
--
Scott DuBois
President EBLUG
BSIT Software Engineering
Freenode: Roguehorse
More information about the Ubuntu-us-ca
mailing list