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" <sdub...@linux.com
> <mailto:sdub...@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@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@lists.ubuntu.com <mailto:Ubuntu-us-ca@lists.ubuntu.com>
>     Modify settings or unsubscribe at:
>     https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-ca
> 
> 
> 

As this was the last message in the thread, I just wanted to take this
moment and thank everyone who tried to help and let all those who
subscribe to the list know that I have finally solved the problem I was
trying for.

After reading the following article, it made sense that I was trying to
establish a second DocumentRoot and access as a separate server location
when what I really wanted to do was serve a website from a location
separate from /var/www/html being /srv/www. While not intentionally
trying to escape sudo to my webdocs, the concept was parallel to my goal.

After successfully establishing two separate VirtualHost documents, thus
being able to establish two separate addresses the documents could be
retrieved from, I was still unable to force feed from /srv/www. however,
after creating a link:

ln -sT /srv/www to /var/www/html/srv

webdocs(/srv/www) -----> DocumentRoot(/var/www/html) -----> Browser

This provided the results I was essentially looking for and as such, can
move projects outside sudo and organize as desired. Such a simple fix
once approached from a different perspective. :)

http://askubuntu.com/questions/46331/how-to-avoid-using-sudo-when-working-in-var-www

Thanks again to everyone who tried to help as each suggestion got me
closer to the solution. ;P

-- 
Scott DuBois
President EBLUG
BSIT Software Engineering
Freenode: Roguehorse

-- 
Ubuntu-us-ca mailing list
Ubuntu-us-ca@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-ca

Reply via email to