Skip to content

Instantly share code, notes, and snippets.

@vvikramjhu
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vvikramjhu/fe6536d774b00958c45f to your computer and use it in GitHub Desktop.
Save vvikramjhu/fe6536d774b00958c45f to your computer and use it in GitHub Desktop.
<VirtualHost localhost:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
ServerName localhost
DocumentRoot /home/vvjhu/www/
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
#<Directory /var/www/>
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>
ServerName localhost
<Directory /home/vvjhu/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
#<Directory /srv/>
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>
vvjhu@vT61:~$ ln -s /media/Yojimbo/gdrives/varun.vikram@airius/safeview_www/www/ /home/vvjhu/www
vvjhu@vT61:~$ sudo truncate -s 0 /var/log/apache2/error.log
[sudo] password for vvjhu:
vvjhu@vT61:~$ cat /var/log/apache2/error.log
vvjhu@vT61:~$ sudo service apache2 restart
* Restarting web server apache2 [ OK ]
vvjhu@vT61:~$ cat /var/log/apache2/error.log
[Fri May 02 18:09:24.241335 2014] [mpm_prefork:notice] [pid 21295] AH00169: caught SIGTERM, shutting down
[Fri May 02 18:09:25.342679 2014] [mpm_prefork:notice] [pid 8350] AH00163: Apache/2.4.9 (Ubuntu) PHP/5.5.11-3+deb.sury.org~precise+1 configured -- resuming normal operations
[Fri May 02 18:09:25.342778 2014] [core:notice] [pid 8350] AH00094: Command line: '/usr/sbin/apache2'
[Fri May 02 18:11:23.656100 2014] [core:error] [pid 8353] [client 127.0.0.1:34189] AH00037: Symbolic link not allowed or link target not accessible: /home/vvjhu/www
vvjhu@vT61:~$ ls -la ~/www
lrwxrwxrwx 1 vvjhu vvjhu 60 May 2 18:08 /home/vvjhu/www -> /media/Yojimbo/gdrives/varun.vikram@airius/safeview_www/www/
vvjhu@vT61:~$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment