Hi all,
After setting my server up to redirect requests of www.scottbouch.com and http://www.scottbouch.com to https://www.scottbouch.com, I'm now experiencing an anoying bug when I'm at home trying to view my site locally.
I followed this guidance and documented it in this thread.
I'm pretty sure this worked immediately after setting up the redirect, but has now stopped (possibly since an update perhaps??).
When I use my servers IP address in a browser to locally view my site, it gets redirected to https://www.scottbouch.com, which fails as my router can't do loopback.
Not only can I not see my website locally, I also can't access my Zoneminder CCTV webpages, or PLEX media server webpage either (all hosted from teh same machine), but I can when I'm not at home.
Any tips on how to allow local lan browser requests to access the servers pages without redirects?
Here's the contents of my etc/apache2/sites-available/000-default.conf file:
Code:
<VirtualHost _default_:80>
ServerName www.scottbouch.com
Redirect / https://www.scottbouch.com/
</VirtualHost>
<VirtualHost _default_:443>
# 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.scottbouch.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/apache2/sites-enabled/6e1709ae5902a152.crt
SSLCertificateKeyFile /etc/apache2/scottbouch.key
SSLCACertificateFile /etc/apache2/sites-enabled/gd_bundle-g2-g1.crt
SSLProtocol All -SSLv2 -SSLv3
# 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
Any help is much appreciated...
Many thanks, Scott.
Bookmarks