<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Apache &#8211; Sandy Scott&#039;s Web Spot</title>
	<atom:link href="https://www.sandyscott.net/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sandyscott.net</link>
	<description>My little corner of the web</description>
	<lastBuildDate>Tue, 26 Jan 2021 10:47:15 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>
	<item>
		<title>Server Setup 0: Contents</title>
		<link>https://www.sandyscott.net/2020/06/server-setup-0-contents/</link>
					<comments>https://www.sandyscott.net/2020/06/server-setup-0-contents/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Thu, 04 Jun 2020 08:29:10 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Collabora]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nextcloud]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://www.sandyscott.net/?p=666</guid>

					<description><![CDATA[Hello and welcome to my series of posts on setting up a server to run Debian Linux, hosting a WordPress and a Nextcloud installation The idea is to take you through all the steps needed to get up and running, some basic familiarity with computers and Linux is assumed, but...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2020/06/server-setup-0-contents/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[
<p>Hello and welcome to my series of posts on setting up a server to run Debian Linux, hosting a WordPress and a Nextcloud installation</p>



<p>The idea is to take you through all the steps needed to get up and running, some basic familiarity with computers and Linux is assumed, but not a lot.</p>



<ul class="wp-block-list"><li><a href="https://www.sandyscott.net/2020/05/18/server-setup-1-os-installation/" data-type="350">Server Setup 1: OS installation</a><br>This goes through a few pre-requisites, and then launches into the installation.</li><li><a href="https://www.sandyscott.net/2020/05/18/server-setup-2-initial-tweaks/" data-type="419">Server Setup 2: Initial tweaks</a><br>These first few steps will make your life easier when administering this server.</li><li><a href="https://www.sandyscott.net/2020/05/19/server-setup-3-install-webserver/" data-type="475">Server Setup 3: Install Webserver</a><br>We&#8217;ll install and test the webserver software &#8211; Apache.</li><li><a href="https://www.sandyscott.net/2020/05/20/server-setup-4-going-public/" data-type="508">Server Setup 4: Going Public</a><br>Configure the server, DNS and your router to allow public access to a placeholder website.</li><li><a href="https://www.sandyscott.net/2020/05/21/server-setup-5-https/" data-type="519">Server Setup 5: HTTPS</a><br>Enable secure connections to your new website with Lets Encrypt and certbot.</li><li><a href="https://www.sandyscott.net/2020/05/21/server-setup-4-wordpress-pre-requisites/" data-type="484">Server Setup 6: WordPress Pre-requisites</a><br>Get ourselves ready to install WordPress &#8211; we need PHP and a database.</li><li><a href="https://www.sandyscott.net/2020/05/21/server-setup-7-install-wordpress/" data-type="539">Server Setup 7: Install WordPress</a><br>Get WordPress installed so you have a functional website!</li><li><a href="https://www.sandyscott.net/2020/05/21/server-setup-8-wordpress-tweaks/" data-type="562">Server Setup 8: WordPress tweaks</a><br>A few tweaks to optimise WordPress.</li><li><a href="https://www.sandyscott.net/2020/05/21/server-setup-9-nextcloud-prep/" data-type="564">Server Setup 9: Nextcloud Prep</a><br>Preparatory work before the Nextcloud installation.</li><li><a href="https://www.sandyscott.net/2020/05/21/server-setup-10-nextcloud-installation/" data-type="575">Server Setup 10: Nextcloud Installation</a><br>Get the database and files system configured, then install Nextcloud</li><li><a href="https://www.sandyscott.net/2020/05/22/server-setup-11-config-improvements/" data-type="582">Server Setup 11: Config Improvements</a><br>Some little tweaks to improve the security of our server</li><li><a href="https://www.sandyscott.net/2020/05/24/server-setup-12-collabora/" data-type="612">Server Setup 12: Collabora</a><br>Install and configure Collabora Online Development Edition</li><li><a href="https://www.sandyscott.net/2020/05/25/server-setup-13-security-improvements/" data-type="621">Server Setup 13: Security Improvements</a><br>Move the WordPress configuration out of the web root</li><li><a href="https://www.sandyscott.net/2020/06/01/server-setup-14-backups/" data-type="516">Server Setup 14: Backups</a><br>This shows how to collect together all the data you need to completely back up your server.</li><li><a href="https://www.sandyscott.net/2020/06/01/server-setup-15-optional-extras/" data-type="602">Server Setup 15: Optional Extras</a><br>Further optional tweaks to make your installation better.</li></ul>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2020/06/server-setup-0-contents/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Server Setup 13: Security Improvements</title>
		<link>https://www.sandyscott.net/2020/05/server-setup-13-security-improvements/</link>
					<comments>https://www.sandyscott.net/2020/05/server-setup-13-security-improvements/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Mon, 25 May 2020 11:20:15 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://www.sandyscott.net/?p=621</guid>

					<description><![CDATA[One recommendation that many security experts make is that the WordPress configuration files should be outside the web root. Lets make this change. WordPress Create a new folder called /var/www_config. Put a new folder in here, wordpress Copy the WordPress configuration file across, and set it&#8217;s permissions so no-one apart...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2020/05/server-setup-13-security-improvements/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[
<p><em>If this is your first time looking at a post from this series, have a look at this summary: <a href="https://www.sandyscott.net/2020/06/04/server-setup-0-contents/" data-type="666">Server Setup 0: Contents</a></em></p>



<p>One recommendation that many security experts make is that the WordPress configuration files should be outside the web root. Lets make this change.</p>



<h2 class="wp-block-heading">WordPress</h2>



<p>Create a new folder called <code>/var/www_config</code>. Put a new folder in here, <code>wordpress</code></p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">cd /var
sudo mkdir www_config
cd www_config
sudo mkdir wordpress</pre></div>



<p>Copy the WordPress configuration file across, and set it&#8217;s permissions so no-one apart from www-data (and root, of course) can read it:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo cp -a /var/www/wordpress/wp-config.php /var/www_config/wordpress/
sudo chown -R www-data:www-data /var/www_config
sudo chmod -R u=rX,go= /var/www_config</pre></div>



<p>Now we need to tell Apache that the when PHP scripts on the wordpress site run, they can only access the folders we want them to:</p>



<ul class="wp-block-list"><li>/var/www/wordpress : our wordpress installation</li><li>/var/www_config/wordpress : our wordpress config</li><li>/tmp : WordPress needs this for handling plugin upgrades etc.</li></ul>



<p>Modify the wordpress Apache site configuration file and add this line inside the VirtualHost section:</p>



<p><code>php_admin_value open_basedir "/var/www/wordpress/:/var/www_config/wordpress/:/tmp/"</code></p>



<p>Now reload Apache.</p>



<p>Finally, WordPress still needs to be able to find this file, so replace the contents of the original wp_config.php with this:</p>



<pre class="wp-block-code"><code>&lt;?php

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');

/** Location of your WordPress configuration. */
require_once('/var/www_config/wordpress/wp-config.php');</code></pre>



<p>It&#8217;ll take effect the moment you save it, so now visit your site from the client, and hopefully nothing has broken!</p>



<h2 class="wp-block-heading">Nextcloud</h2>



<p>For some reason this isn&#8217;t as widely recommended by Nextcloud users. I&#8217;ll investigate and update this post with my suggestion.</p>



<p>For now, just make sure only www-data can read and write the config file:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;sudo cp -a /var/www/wordpress/wp-config.php /var/www_config/wordpress/Shell&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo chown -R www-data:www-data /var/www/nextcloud/config/
sudo chmod -R u=rX,go= /var/www/nextcloud/config/</pre></div>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2020/05/server-setup-13-security-improvements/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Server Setup 12: Collabora</title>
		<link>https://www.sandyscott.net/2020/05/server-setup-12-collabora/</link>
					<comments>https://www.sandyscott.net/2020/05/server-setup-12-collabora/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Sun, 24 May 2020 18:37:57 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Collabora]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nextcloud]]></category>
		<guid isPermaLink="false">https://www.sandyscott.net/?p=612</guid>

					<description><![CDATA[The final of the 3 big pieces &#8211; this provides document editing capability in Nextcloud. Install Collabora There are a couple of ways to install Collabora, and the recommended way is to use a Docker image. That isn&#8217;t ideal for us because the Docker version will use more resources which...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2020/05/server-setup-12-collabora/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[
<p><em>If this is your first time looking at a post from this series, have a look at this summary: <a href="https://www.sandyscott.net/2020/06/04/server-setup-0-contents/" data-type="666">Server Setup 0: Contents</a></em></p>



<p>The final of the 3 big pieces &#8211; this provides document editing capability in Nextcloud.</p>



<h2 class="wp-block-heading">Install Collabora</h2>



<p>There are a couple of ways to install Collabora, and the recommended way is to use a Docker image. That isn&#8217;t ideal for us because the Docker version will use more resources which we can&#8217;t afford if you&#8217;re running this on something old. Instead, Collabora provide respositories, so these commands will:</p>



<ol class="wp-block-list"><li>Install a little tool me we need</li><li>Get the security keys so the repository is safe to use</li><li>Add the repository to our <code>/etc/apt/sources.list</code>.</li><li>Install Collabora</li></ol>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo apt install gnupg
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D
sudo echo 'deb https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-debian10 ./' | sudo tee -a /etc/apt/sources.list
sudo apt update &amp;&amp; sudo apt install loolwsd code-brand</pre></div>



<h2 class="wp-block-heading">Configure Collabora</h2>



<p>Modify <code>/etc/loolwsd/loolwsd.xml</code></p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /etc/loolwsd/loolwsd.xml</pre></div>



<p>We&#8217;ll disable SSL in collabora itself, because Apache will handle that. Find <code>&lt;ssl desc="SSL settings"&gt;</code>. Look at the line below. Change the second-to last word to <code>false</code>. It should now be this:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;xml&quot;,&quot;mime&quot;:&quot;application/xml&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;XML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;xml&quot;}">&lt;enable type=&quot;bool&quot; desc=&quot;Controls whether SSL encryption between browser and loolwsd is enabled (do not disable for production deployment). If default is false, must first be compiled with SSL support to enable.&quot; default=&quot;true&quot;&gt;false&lt;/enable&gt;</pre></div>



<p>In the line below that, the second-to last word should be <code>true</code>.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;xml&quot;,&quot;mime&quot;:&quot;application/xml&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;XML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;xml&quot;}">&lt;termination desc=&quot;Connection via proxy where loolwsd acts as working via https, but actually uses http.&quot; type=&quot;bool&quot; default=&quot;true&quot;&gt;true&lt;/termination&gt;</pre></div>



<p>Now find <code>&lt;wopi desc="Allow/de.....</code> Add a line below it, swapping in your <strong>Nextcloud</strong> domain name, with the dots <code>"."</code> escaped with backslashes <code>"\."</code>.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">&lt;host desc=&quot;Regex pattern of hostname to allow or deny.&quot; allow=&quot;true&quot;&gt;nextcloud\.example\.org&lt;/host&gt;</pre></div>



<p>Save and close the file, then restart Collabora</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&lt;code&gt;sudo systemctl restart loolwsd&lt;/code&gt;Shell&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo systemctl restart loolwsd</pre></div>



<h2 class="wp-block-heading">Test</h2>



<p>There isn&#8217;t a whole lot of testing we can do on Collabora as an intermediate step, but this will at least confirm the server is running. This command asks Collabora for a file saying what it&#8217;s capable of:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">cd ~
wget http://localhost:9980/hosting/capabilities</pre></div>



<p>If it seems to run OK, you should now have a file called <code>capabilites </code>in your home (~) directory. Lets look at what&#8217;s inside:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;cShell&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">cat ~/capabilities</pre></div>



<pre class="wp-block-code"><code>{"convert-to":{"available":true},"hasMobileSupport":true,"hasTemplateSaveAs":false,"hasTemplateSource":true,"productName":"Collabora Online Development Edition"}</code></pre>



<p>Looking good!</p>



<h2 class="wp-block-heading">Configure Apache</h2>



<p>In this situation, all Apache has to do is act as a proxy between Collabora and the internet &#8211; we can&#8217;t connect it directly because otherwise the other sites (WordPress and Nextcloud) wouldn&#8217;t work.</p>



<p>Enable these 3 modules:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo a2enmod proxy proxy_http proxy_wstunnel</pre></div>



<p>Edit the main Collabora SSL Apache configuration file:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /etc/apache2/sites-available/collabora-le-ssl.conf</pre></div>



<p>Change it to this:</p>



<pre class="wp-block-code"><code>&lt;VirtualHost *:443&gt;
    ServerName collabora.example.org
    ErrorLog ${APACHE_LOG_DIR}/collabora_error.log
    CustomLog ${APACHE_LOG_DIR}/collabora_access.log combined

    SSLCertificateFile /etc/letsencrypt/live/collabora.example.org/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/collabora.example.org/privkey.pem
    Include /etc/letsencrypt/options-ssl-apache.conf
	# Encoded slashes need to be allowed
	AllowEncodedSlashes NoDecode

	# Container uses a unique non-signed certificate
	SSLProxyEngine On
	SSLProxyVerify None
	SSLProxyCheckPeerCN Off
	SSLProxyCheckPeerName Off

	# keep the host
	ProxyPreserveHost On

	# static html, js, images, etc. served from loolwsd
	# loleaflet is the client part of Collabora Online
	ProxyPass           /loleaflet http://127.0.0.1:9980/loleaflet retry=0
	ProxyPassReverse    /loleaflet http://127.0.0.1:9980/loleaflet

	# WOPI discovery URL
	ProxyPass           /hosting/discovery http://127.0.0.1:9980/hosting/discovery retry=0
	ProxyPassReverse    /hosting/discovery http://127.0.0.1:9980/hosting/discovery

	# Capabilities
	ProxyPass           /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities retry=0
	ProxyPassReverse    /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities

&lt;/VirtualHost&gt;</code></pre>



<p>Basically, the bits we&#8217;ve added are a two-way connector between Apache and Collabora, and it needs slightly different things for all of the different features.</p>



<p>Reload Apache.</p>



<p>Configure Nextcloud</p>



<ol class="wp-block-list"><li>Log into Nextcloud with your admin account.</li><li>Click on the circle with your initial in the top right corner, choose Apps.</li><li>Click on <strong>Office &amp; text</strong> from the menu on the left.</li><li>Find Collabora Online and click <strong>Download and enable</strong><br></li></ol>



<figure class="wp-block-image size-large"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-44.png"><img fetchpriority="high" decoding="async" width="358" height="297" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-44.png" alt="" class="wp-image-616" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-44.png 358w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-44-300x249.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-44-150x124.png 150w" sizes="(max-width: 358px) 100vw, 358px" /></a></figure>



<ol class="wp-block-list" start="5"><li>Click on the circle with your initial in the top right corner, choose Settings.</li><li>Click on Collabora Online near the bottom of the menu on the left.</li><li>Choose <strong>Use your own server</strong></li><li>Enter your Collabora domain name with the https:// and then hit save.</li></ol>



<figure class="wp-block-image size-medium"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-45.png"><img decoding="async" width="300" height="171" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-45-300x171.png" alt="" class="wp-image-617" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-45-300x171.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-45-150x85.png 150w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-45.png 750w" sizes="(max-width: 300px) 100vw, 300px" /></a></figure>



<p>Now go back to the files section and give it a try!</p>



<ul class="wp-block-list"><li>You should have the option to create a <strong>New Document</strong>, <strong>New Spreadsheet</strong> or <strong>New Presentation</strong> from the &#8220;+&#8221; icon.</li></ul>



<figure class="wp-block-image size-medium"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-46.png"><img decoding="async" width="209" height="300" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-46-209x300.png" alt="" class="wp-image-618" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-46-209x300.png 209w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-46-104x150.png 104w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-46.png 236w" sizes="(max-width: 209px) 100vw, 209px" /></a></figure>



<ul class="wp-block-list"><li>Or if you have any files on Open Document (.odt, .ods, .odp) or Open Office XML (.docx, .xlsx, .pptx) formats you can try opening them. They should open for editing in Collabora:</li></ul>



<figure class="wp-block-image size-large is-resized"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-47.png"><img loading="lazy" decoding="async" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-47.png" alt="" class="wp-image-619" width="299" height="195" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-47.png 598w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-47-300x196.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-47-150x98.png 150w" sizes="(max-width: 299px) 100vw, 299px" /></a></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2020/05/server-setup-12-collabora/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Server Setup 11: Config Improvements</title>
		<link>https://www.sandyscott.net/2020/05/server-setup-11-config-improvements/</link>
					<comments>https://www.sandyscott.net/2020/05/server-setup-11-config-improvements/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Fri, 22 May 2020 17:08:31 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nextcloud]]></category>
		<guid isPermaLink="false">https://www.sandyscott.net/?p=582</guid>

					<description><![CDATA[Before enabling public access to Nextcloud, lets take a moment to improve things a little. Apache Config First up, let&#8217;s force the use of the HTTPS and make sure we haven&#8217;t left any security holes by stripping back the HTTP config file to it&#8217;s bare bones. The default Apache configuration...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2020/05/server-setup-11-config-improvements/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[
<p><em>If this is your first time looking at a post from this series, have a look at this summary: <a href="https://www.sandyscott.net/2020/06/04/server-setup-0-contents/" data-type="666">Server Setup 0: Contents</a></em></p>



<p>Before enabling public access to Nextcloud, lets take a moment to improve things a little.</p>



<h2 class="wp-block-heading">Apache Config</h2>



<p>First up, let&#8217;s force the use of the HTTPS and make sure we haven&#8217;t left any security holes by stripping back the HTTP config file to it&#8217;s bare bones.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;sudoedit /etc/apache2/sites-available/nextcloud.confShell&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /etc/apache2/sites-available/nextcloud.conf</pre></div>



<pre class="wp-block-code"><code>&lt;VirtualHost *:80>
	ServerName nextcloud.example.org
	Redirect permanent / https://nextcloud.example.org/
&lt;/VirtualHost></code></pre>



<p>The default Apache configuration gives access to a little too much &#8211; we can lock that down, and just open up the bits we want later with the site-specific configuration files.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /etc/apache2/apache2.conf</pre></div>



<p>Look for this section and put a <code>#</code> at the beginning of every line so they&#8217;re ignored.</p>



<pre class="wp-block-code"><code>&lt;Directory /usr/share>
	AllowOverride None
	Require all granted
&lt;/Directory>

&lt;Directory /var/www/>
	Options Indexes FollowSymLinks
	AllowOverride None
	Require all granted
&lt;/Directory></code></pre>



<p>Now we have to give access back just where want it:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /etc/apache2/sites-available/nextcloud-le-ssl.conf</pre></div>



<p>Before the <code>ErrorLog </code>line, add this:</p>



<pre class="wp-block-code"><code>&lt;Directory /var/www/nextcloud>
    Require all granted
&lt;/Directory></code></pre>



<p>Then do the same for the WordPress config:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /etc/apache2/sites-available/wordpress-le-ssl.conf	</pre></div>



<p>Before the <code>ErrorLog </code>line, add this:</p>



<pre class="wp-block-code"><code>&lt;Directory /var/www/wordpress>
    Require all granted
&lt;/Directory></code></pre>



<p>Restart Apache (you should know how to do that by now &#8211; look back through the previous posts until you find it.)</p>



<h2 class="wp-block-heading">Nextcloud Administration Warnings</h2>



<p>Log into your nextcloud administrator account, click on the circle with your initial in the top right corner, choose setttings. On the page that pops up, pick Overview from the menu on the right.</p>



<p>The system will think for a moment, then show a list of warnings:</p>



<figure class="wp-block-image size-medium"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-43.png"><img loading="lazy" decoding="async" width="300" height="279" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-43-300x279.png" alt="" class="wp-image-599" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-43-300x279.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-43-1024x954.png 1024w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-43-768x715.png 768w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-43-150x140.png 150w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-43.png 1035w" sizes="(max-width: 300px) 100vw, 300px" /></a></figure>



<p>If your list is the same as mine, I&#8217;ll show you how to fix the first 2, but you can work through the others on your own if you like.</p>



<h2 class="wp-block-heading">PHP Memory Limit</h2>



<p><strong><em>&#8220;The PHP memory limit is below the recommended value of 512MB.&#8221;</em></strong></p>



<p>It isn&#8217;t essential to fix this, and if you&#8217;re running nextcloud on an old, lower powered machine I wouldn&#8217;t recommend it, because that&#8217;s the limit per script, and a script fires up every time someone access your site, so with a few users doing heavy things, you&#8217;ll have a problem.</p>



<p>If you do want to do it, edit the PHP configuration file:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /etc/php/7.3/apache2/php.ini</pre></div>



<p>Find this line and change the number to what you want:</p>



<pre class="wp-block-code"><code>memory_limit = 512M</code></pre>



<p>Then restart Apache</p>



<h2 class="wp-block-heading">Enable HSTS</h2>



<p><strong><em>&#8220;The &#8220;Strict-Transport-Security&#8221; HTTP header is not set to at least &#8220;15552000&#8221; seconds. For enhanced security, it is recommended to enable HSTS as described in the <a href="https://docs.nextcloud.com/server/18/go.php?to=admin-security">security tips <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/2197.png" alt="↗" class="wp-smiley" style="height: 1em; max-height: 1em;" /></a>.&#8221;</em></strong></p>



<p>You can follow that link in the tip to find out the details of how we fix this, but these are the steps:</p>



<p>Enable the Apache headers module:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo a2enmod headers</pre></div>



<p>Modify the Nextcloud apache configuration:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /etc/apache2/sites-available/nextcloud-le-ssl.conf</pre></div>



<p>Add this after the ServerName line:</p>



<pre class="wp-block-code"><code>Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"</code></pre>



<p>And reload Apache</p>



<h2 class="wp-block-heading">Re-enable public access</h2>



<p>Now we&#8217;ve dealt with a few potential security issues, you can enable access to Nextcloud from outside you network.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;sudShell&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /etc/apache2/sites-available/nextcloud-le-ssl.conf</pre></div>



<p>Either delete, or comment out these 3 lines. You can make a line into a comment by putting a # at the beginning of the line. That means it will be ignored.</p>



<pre class="wp-block-code"><code>&lt;Location />
    Require ip xxx.xxx.xxx.0/24
&lt;/Location></code></pre>



<p>Reload apache and you&#8217;re done!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2020/05/server-setup-11-config-improvements/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Server Setup 10: Nextcloud Installation</title>
		<link>https://www.sandyscott.net/2020/05/server-setup-10-nextcloud-installation/</link>
					<comments>https://www.sandyscott.net/2020/05/server-setup-10-nextcloud-installation/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Thu, 21 May 2020 21:44:43 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[Nextcloud]]></category>
		<guid isPermaLink="false">https://www.sandyscott.net/?p=575</guid>

					<description><![CDATA[Database Again, same as for WordPress, we need a database and a user. Same command to login as the root database server user: a similar set of SQL commands to set up the nextcloud database: Disable Public Access &#8211; a different way Like before, we don&#8217;t want the Nextclound site...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2020/05/server-setup-10-nextcloud-installation/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[
<p><em>If this is your first time looking at a post from this series, have a look at this summary: <a href="https://www.sandyscott.net/2020/06/04/server-setup-0-contents/" data-type="666">Server Setup 0: Contents</a></em></p>



<h2 class="wp-block-heading">Database</h2>



<p>Again, same as for WordPress, we need a database and a user. Same command to login as the root database server user:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo mysql -u root -p</pre></div>



<p>a similar set of SQL commands to set up the nextcloud database:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">CREATE USER 'nc_usr'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE IF NOT EXISTS nc_db CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES on nc_db.* to 'nc_usr'@'localhost';
FLUSH privileges;
EXIT;</pre></div>



<h2 class="wp-block-heading">Disable Public Access &#8211; a different way</h2>



<p>Like before, we don&#8217;t want the Nextclound site to be public until we&#8217;ve completed the installation &amp; configuration. On the other hand, we don&#8217;t want to do the same as before (cutting our server off from the internet by turning off port forwarding on the router) because we have an active WordPress installation that people might be using.</p>



<p>To do this we&#8217;ll tell Apache to only respond to requests (for the Nextcloud site) from your internal network, not from the public internet:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;sudShell&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /etc/apache2/sites-available/nextcloud.conf</pre></div>



<p>Add this section, just before the <code>ErrorLog</code> line, replacing the xxx.xxx.xxx with the first 3 blocks of your IP address on your network.</p>



<pre class="wp-block-code"><code>&lt;Location />
    Require ip xxx.xxx.xxx.0/24
&lt;/Location></code></pre>



<p>Reload apache:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;suShell&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo systemctl reload apache</pre></div>



<h2 class="wp-block-heading">Download the installer script</h2>



<p>Navigate to the nextcloud folder</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">cd /var/www/nextcloud</pre></div>



<p>Download the installer script, and pass ownership of it and the entire nextcloud folder to www-data (which is apache, remember).</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo wget https://download.nextcloud.com/server/installer/setup-nextcloud.php
sudo chown -R www-data:www-data /var/www/nextcloud</pre></div>



<p>We should also create a data folder outside the <code>/var/www</code> folder, which improves security:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo mkdir /var/nc_data
sudo chown -R www-data:www-data /var/nc_data</pre></div>



<h2 class="wp-block-heading">Run Installation Script</h2>



<p>On the client machine, open a browser and go to <a href="http://nextcloud.example.org/setup-nextcloud.php">nextcloud.example.org/setup-nextcloud.php</a></p>



<p>You should see the Setup Wizard, most it should be easy to understand, click your way through:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="797" height="624" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-34.png" alt="" class="wp-image-566" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-34.png 797w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-34-300x235.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-34-768x601.png 768w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-34-150x117.png 150w" sizes="(max-width: 797px) 100vw, 797px" /></figure>



<p>Put a &#8220;.&#8221; in the box like it says because the Nextcloud installer is already in the correct place</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="364" height="444" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-35.png" alt="" class="wp-image-569" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-35.png 364w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-35-246x300.png 246w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-35-123x150.png 123w" sizes="(max-width: 364px) 100vw, 364px" /></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="362" height="356" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-36.png" alt="" class="wp-image-570" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-36.png 362w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-36-300x295.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-36-150x148.png 150w" sizes="(max-width: 362px) 100vw, 362px" /></figure>



<ul class="wp-block-list"><li>Enter the details for the database and database user you created above.</li><li>Make an admin account with a strong password.</li><li>Change the data folder to the one we just created:<code> /var/nc_data</code>,</li><li>I&#8217;d recommend unticking the <strong>Install recommended apps</strong> box. You can add them later if you like.</li></ul>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="315" height="1024" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-42-315x1024.png" alt="" class="wp-image-596" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-42-315x1024.png 315w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-42-92x300.png 92w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-42-46x150.png 46w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-42.png 368w" sizes="(max-width: 315px) 100vw, 315px" /></figure>



<p>Once this is done you should be able to log in and start using it!</p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2020/05/server-setup-10-nextcloud-installation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Server Setup 9: Nextcloud Prep</title>
		<link>https://www.sandyscott.net/2020/05/server-setup-9-nextcloud-prep/</link>
					<comments>https://www.sandyscott.net/2020/05/server-setup-9-nextcloud-prep/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Thu, 21 May 2020 21:22:16 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[certbot]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nextcloud]]></category>
		<guid isPermaLink="false">https://www.sandyscott.net/?p=564</guid>

					<description><![CDATA[First, we need 1 extra PHP module: Like with WordPress, we&#8217;ll create a folder and apache configuration for Nextcloud: And we&#8217;ll use essentially the same apache configuration we used for wordpress, with a few tweaks. We&#8217;ll also create a temporary configuration for collabora while we&#8217;re here: This is just a...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2020/05/server-setup-9-nextcloud-prep/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[
<p><em>If this is your first time looking at a post from this series, have a look at this summary: <a href="https://www.sandyscott.net/2020/06/04/server-setup-0-contents/" data-type="666">Server Setup 0: Contents</a></em></p>



<p>First, we need 1 extra PHP module:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;sudShell&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo apt install php-gd</pre></div>



<p>Like with WordPress, we&#8217;ll create a folder and apache configuration for Nextcloud:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">cd /var/www
sudo mkdir nextcloud
sudoedit /etc/apache2/sites-available/nextcloud.conf</pre></div>



<p>And we&#8217;ll use essentially the same apache configuration we used for wordpress, with a few tweaks.</p>



<pre class="wp-block-code"><code>&lt;VirtualHost *:80>
    ServerName nextcloud.example.org
    DocumentRoot /var/www/nextcloud
    
    &lt;Directory /var/www/nextcloud/>
        Require all granted
        AllowOverride All
        Options FollowSymLinks MultiViews

        &lt;IfModule mod_dav.c>
            Dav off
        &lt;/IfModule>
    &lt;/Directory>

    ErrorLog ${APACHE_LOG_DIR}/nextcloud_error.log
    CustomLog ${APACHE_LOG_DIR}/nextcloud_access.log combined
&lt;/VirtualHost></code></pre>



<p>We&#8217;ll also create a temporary configuration for collabora while we&#8217;re here:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /etc/apache2/sites-available/collabora.conf</pre></div>



<pre class="wp-block-code"><code>&lt;VirtualHost *:80>
    ServerName collabora.example.org
    ErrorLog ${APACHE_LOG_DIR}/collabora_error.log
    CustomLog ${APACHE_LOG_DIR}/collabora_access.log combined
&lt;/VirtualHost></code></pre>



<p>This is just a barebones template that&#8217;s just enough to let us set up HTTPS later.</p>



<p>Enable the sites and reload apache:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo a2ensite nextcloud collabora
sudo systemctl reload apache2</pre></div>



<h2 class="wp-block-heading">DNS</h2>



<p>We need to create DNS Entries for Nextcloud and Collabora:</p>



<ol class="wp-block-list"><li>Log into the control panel for your domain.</li><li>Create a <strong>CNAME </strong>record<ul><li>Domain: e.g. <strong>nextcloud.example.org</strong></li><li>Data: e.g. <strong>example.org</strong> if you had a fixed IP, or the dynamic DNS server address you created e.g. <strong><strong>anotherexample.ddns.net</strong></strong></li></ul></li><li>Do the exact same for <strong>collabora.example.org</strong></li></ol>



<h2 class="wp-block-heading">HTTPS</h2>



<p>Use certbot again to enable https on both <strong>nextcloud.example.org</strong> and <strong>collabora.example.org</strong></p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo certbot --apache</pre></div>



<p>When it asks you which sites you want to activate HTTPS for, you can select multiple options by putting a comma separated list. You can also choose to allow certbot to automatically reconfigure apache to <strong>Redirect</strong> (option 2 when it asks you).</p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2020/05/server-setup-9-nextcloud-prep/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Server Setup 4: Going Public</title>
		<link>https://www.sandyscott.net/2020/05/server-setup-4-going-public/</link>
					<comments>https://www.sandyscott.net/2020/05/server-setup-4-going-public/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Wed, 20 May 2020 16:29:16 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Domain names]]></category>
		<category><![CDATA[domains]]></category>
		<guid isPermaLink="false">https://www.sandyscott.net/?p=508</guid>

					<description><![CDATA[In this post we&#8217;ll configure another site that will hold your WordPress installation (but not install WordPress yet) and make it available on the internet. Domain name setup While it&#8217;s technically possible to get at your site without a domain name, it&#8217;s pretty awkward. So, go buy one &#8211; they&#8217;re...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2020/05/server-setup-4-going-public/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[
<p><em>If this is your first time looking at a post from this series, have a look at this summary: <a href="https://www.sandyscott.net/2020/06/04/server-setup-0-contents/" data-type="666">Server Setup 0: Contents</a></em></p>



<p>In this post we&#8217;ll configure another site that will hold your WordPress installation (but not install WordPress yet) and make it available on the internet.</p>



<h2 class="wp-block-heading">Domain name setup</h2>



<p>While it&#8217;s technically possible to get at your site without a domain name, it&#8217;s pretty awkward.</p>



<p>So, go buy one &#8211; they&#8217;re cheap, and there and hundreds to choose from. Just google &#8220;domain name&#8221;. A few bits of advice:</p>



<ul class="wp-block-list"><li>While there are some very cheap deals, it&#8217;s often just for the first year. Pay attention to the renewal price, in case you want to keep the domain a long time.</li><li>Look for WHOIS Privacy or a similar feature. You&#8217;re required (by law) to provide your real name and contact details when you buy a domain, but WHOIS Privacy means that the information is protected and not publicly available. It might cost extra.</li></ul>



<p>So now you own a little slice of the internet. For the rest of this example I&#8217;ll assume it&#8217;s <strong>example.org</strong>. You can do what you like with this, like creating websites at <strong>www.example.org</strong>, <strong>thingy.example.org</strong> or set up an email service with <strong>joebloggs@email.example.org</strong>. For this tutorial, We&#8217;ll install WordPress at <strong>www.example.org</strong>.</p>



<h2 class="wp-block-heading">Apache Site Configuration</h2>



<p>First up, lets create a webpage in a new folder in /var/www/</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">cd /var/www
sudo mkdir wordpress
cd wordpress
sudoedit index.html</pre></div>



<p>We&#8217;ll put some real HTML in it this time:</p>



<pre class="wp-block-code"><code>&lt;html>
    &lt;head>
        &lt;title>My website&lt;/title>
    &lt;/head>
    &lt;body>
        &lt;h1>Hello Everyone&lt;/h1>
        &lt;p>It's not ready yet, but check back soon for my new blog!&lt;/p>
    &lt;/body>
&lt;/html></code></pre>



<p>Now we&#8217;ll create the apache site that&#8217;ll show you this page. This time the address will be www.example.com</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /etc/apache2/sites-available/wordpress.conf</pre></div>



<pre class="wp-block-code"><code>&lt;VirtualHost *:80>
    ServerName www.example.org
    DocumentRoot /var/www/wordpress

     &lt;Directory /var/www/html/wordpress/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
    &lt;/Directory>

    ErrorLog ${APACHE_LOG_DIR}/wordpress_error.log
    CustomLog ${APACHE_LOG_DIR}/wordpress_access.log combined
&lt;/VirtualHost></code></pre>



<p>We&#8217;ll enable this site, disable the default site while we&#8217;re at it, and reload apache:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;sudShell&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo a2ensite wordpress
sudo a2dissite 000-default
sudo systemctl reload apache2</pre></div>



<p>Configure the hosts files on your client:</p>



<pre class="wp-block-code"><code>xxx.xxx.xxx.xxx www.example.org</code></pre>



<p>And load it up <a href="http://www.example.org">www.example.org</a> in the browser on your client to test!</p>



<figure class="wp-block-image size-full is-resized"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-20.png"><img loading="lazy" decoding="async" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-20.png" alt="" class="wp-image-513" width="500" height="211" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-20.png 500w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-20-300x127.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-20-150x63.png 150w" sizes="(max-width: 500px) 100vw, 500px" /></a></figure>



<h2 class="wp-block-heading">Port Forwarding</h2>



<p>So, what we&#8217;ve done so far:</p>



<ul class="wp-block-list"><li>Configure a server that is a website that works inside your home network.</li></ul>



<p>The next step is:</p>



<ul class="wp-block-list"><li>Send traffic that arrives at your router (from the internet) to your server.</li></ul>



<p>That&#8217;s called <strong>Port Forwarding</strong>. If you&#8217;re unfamiliar with the concept of <strong>ports</strong> in computer networking, I like to think of them like telephone extension numbers when you call a large company &#8211; the main phone number gets you to the reception, but if you also have the extension number, you gets straight to the right department.</p>



<p>Port forwarding means that when traffic arrives at your router, it looks at what the port is, then uses that to decide which device on the network to send the traffic to.</p>



<p>Exactly how you get your router to do this is dependant on the make and model of your router &#8211; you can look in the documentation for it &#8211; the name of this feature is usually port forwarding, but could be Permit Access, Port Sharing, or something related. <a href="https://portforward.com">The website portforward.com</a> is a great resouces for rotuer-specific information on how to do this.</p>



<p>Your router might have built in profiles for hosting a website: they&#8217;ll usually be called something like (the names in brackets are the secure versions of the same thing).</p>



<ul class="wp-block-list"><li>Website (Secure Website)</li><li>HTTP (HTTPS)</li><li>HTTP Server (HTTPS Server)</li></ul>



<p>If not, you need to forward traffic arriving on ports 80 to your server (either by IP or hostname), also on ports 80. Do the same exact thing with port 443 as well.</p>



<h2 class="wp-block-heading">DNS configuration</h2>



<p>The final step is to make it so that when someone types in your domain name (e.g. www.example.org) the traffic gets to your router.</p>



<p>How this depends on your ISP. I&#8217;m going to assume they aren&#8217;t blocking you from hosting a website. You&#8217;ll either have a fixed IP address (great!) or dynamic IP address (not so great, but still workable).</p>



<p>This is the public IP of your router, not your local network IP address that we&#8217;ve been working with so far. This is what appears when you Google <a href="https://www.google.com/search?client=firefox-b-d&amp;q=what%27s+my+ip+address">What&#8217;s my IP Address</a>.</p>



<p>Ask your ISP if you&#8217;re not sure if your IP address is fixed or dynamic.</p>



<h3 class="wp-block-heading">Fixed IP</h3>



<p>If your internet service includes a fixed IP, this next steps are pretty simple.</p>



<ol class="wp-block-list"><li>Find out what the IP address is. e.g. <strong>203.0.113.123</strong></li><li>Log into the control panel for your domain.</li><li>Look for an option to create or modify DNS records</li><li>Create an <strong>A</strong> record.<ul><li>The Domain section will be the bare domain you just bought &#8211; e.g. <strong>example.org</strong></li><li>The Data is your fixed IP address e.g. <strong>203.0.113.123</strong></li></ul></li><li>Create a <strong>CNAME </strong>record<ul><li>Domain: e.g. <strong>www.example.org</strong></li><li>Data: e.g. <strong>example.org</strong></li></ul></li><li>Save all the changes, and after a little while (could be seconds, could be hours) you&#8217;ll be able to get at your website from outside your home network! Try on your phone with wifi switched off (so you&#8217;re using your mobile (cellular) data.</li></ol>



<h3 class="wp-block-heading">Dynamic IP</h3>



<p>This means every time your router connects to the internet, it could have a different IP address. This means an A record with a fixed IP like above won&#8217;t work.</p>



<p>You&#8217;ll need use a Dynamic DNS Service to get around this.</p>



<p>Each of these has two parts:</p>



<ul class="wp-block-list"><li>An online service<ul><li>There are lots of services, <a href="https://www.noip.com/">no-ip.com</a> is a large and well respected one with a free service level and a linux client.</li></ul></li><li>An update client &#8211; a program running on a device on your network that tells the online service where it is.<ul><li>This could run on anything &#8211; your router might be able to run it &#8211; have a look through it&#8217;s documenation and see if your chosen Dynamic DNS service is supported.</li></ul></li></ul>



<p>So the steps are:</p>



<ol class="wp-block-list"><li>Pick a Dynamic DNS Service and sign up.</li><li>Create a domain name within their system e.g. <strong>anotherexample.ddns.net</strong>. It doesn&#8217;t matter what name you choose.</li><li>Either configure your router with your account details, or follow your chosen service&#8217;s instructions to install &amp; configure the client on your server.</li><li>You should be able to see if it&#8217;s working by logging into the Service and checking what the IP is and when it was last updated. It should show your public IP address.</li><li>Log into the control panel for your domain.</li><li>Look for an option to create or modify DNS records</li><li>Create a <strong>CNAME </strong>record<ul><li>Domain: e.g. <strong>www.example.org</strong></li><li>Data: e.g. <strong><strong>anotherexample.ddns.net</strong></strong> (that you created above)</li></ul></li><li>Save all the changes, and after a little while (could be seconds, could be hours) you&#8217;ll be able to get at your website from outside your home network! Try on your phone with wifi switched off (so you&#8217;re using your mobile (cellular) data.</li></ol>



<h2 class="wp-block-heading">Tidying up</h2>



<p>Once you&#8217;ve verified that that you can get at your website from outside your network, I&#8217;d recommend removing the entry in your client&#8217;s hosts file. This means that when your client tries to access your website, it&#8217;ll use the public IP address (instead of the private IP address inside your network). However, your router should be smart enough to realise that, and direct the request to your server. This may be marginally slower, but it&#8217;ll make it easier to catch and fix DNS or router issues when inside your network.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2020/05/server-setup-4-going-public/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Server Setup 3: Install Webserver</title>
		<link>https://www.sandyscott.net/2020/05/server-setup-3-install-webserver/</link>
					<comments>https://www.sandyscott.net/2020/05/server-setup-3-install-webserver/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Tue, 19 May 2020 22:21:39 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://www.sandyscott.net/?p=475</guid>

					<description><![CDATA[Install Apache Now we&#8217;ll install the software that actually serves webpages to your browser. Install apache check it&#8217;s running: The output should look something like this: Press q if it won&#8217;t let you do anything else after showing this message. Let&#8217;s test it! On your client pc, open a web...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2020/05/server-setup-3-install-webserver/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[
<p><em>If this is your first time looking at a post from this series, have a look at this summary: <a href="https://www.sandyscott.net/2020/06/04/server-setup-0-contents/" data-type="666">Server Setup 0: Contents</a></em></p>



<h2 class="wp-block-heading">Install Apache</h2>



<p>Now we&#8217;ll install the software that actually serves webpages to your browser.</p>



<p>Install apache</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;sudpShell&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo apt install apache2</pre></div>



<p>check it&#8217;s running:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo systemctl status apache2</pre></div>



<p>The output should look something like this:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sandy@waldorf:/mnt$ sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2020-05-19 13:41:38 BST; 21s ago
     Docs: https://httpd.apache.org/docs/2.4/
 Main PID: 1128 (apache2)
    Tasks: 55 (limit: 4523)
   Memory: 18.0M
   CGroup: /system.slice/apache2.service
           ├─1128 /usr/sbin/apache2 -k start
           ├─1129 /usr/sbin/apache2 -k start
           └─1130 /usr/sbin/apache2 -k start</pre></div>



<p>Press q if it won&#8217;t let you do anything else after showing this message.</p>



<p>Let&#8217;s test it!</p>



<p>On your client pc, open a web browser and type in http://hostname or http://xxx.xxx.xxx.xxx swapping the hostname or IP address of your server as approprite. You need to type the &#8220;http://&#8221; otherwise your browser will think you&#8217;re doing a search. You should see a page like this:</p>



<figure class="wp-block-image size-full is-resized"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-14.png"><img loading="lazy" decoding="async" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-14.png" alt="" class="wp-image-476" width="252" height="156" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-14.png 1009w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-14-300x185.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-14-768x473.png 768w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-14-150x92.png 150w" sizes="(max-width: 252px) 100vw, 252px" /></a><figcaption>Apache2 Debian Test Page</figcaption></figure>



<h2 class="wp-block-heading">Additional test configuration</h2>



<p>This step is optional, but may help later. We&#8217;ll configure a test site that will give us lots of useful information about our websever, great for debugging if (when) something goes doesn&#8217;t work.</p>



<p>First, pick a domain name. If you already own one you want to use for this site, then use that otherwise you can make something up. I&#8217;ll use example.org for this tutorial. Our test site will be at a subdomain: test.example.org</p>



<p>first, create a directory to hold files we want to test:</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo mkdir /var/www/test</pre></div>



<p>make an index.html in this folder</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /var/www/test/index.html</pre></div>



<pre class="wp-block-code"><code>"Hello, world wide web!"</code></pre>



<p>Normally this file would contain html tags, but this&#8217;ll do for a quick test</p>



<p>Create test.conf in /etc/apache2/sites-available</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&lt;br&gt;Shell&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudoedit /etc/apache2/sites-available/test.conf</pre></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;apl&quot;,&quot;mime&quot;:&quot;text/apl&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;APL&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;apl&quot;}">&lt;VirtualHost *:80&gt;
    ServerName test.example.org
    DocumentRoot /var/www/test

    &lt;Location /&gt;
		Require ip     192.168.2.0/24
	&lt;/Location&gt;

	&lt;Location &quot;/server-info&quot;&gt;
		SetHandler server-info
	&lt;/Location&gt;

	&lt;Location &quot;/server-status&quot;&gt;
		SetHandler server-status
	&lt;/Location&gt;
    
    ErrorLog ${APACHE_LOG_DIR}/test_error.log
    CustomLog ${APACHE_LOG_DIR}/test_access.log combined

&lt;/VirtualHost&gt;</pre></div>



<p>You should modify the xxx.xxx.xxx to the first 3 blocks of the server&#8217;s IP address on your network.</p>



<p>This sets up a website that can show a lot of useful information, and the <code>Require </code>lines mean it&#8217;s only accessible from inside your network. Maybe I&#8217;ll break down the contents of this in a later blog post. Comment if you&#8217;d like to see that.</p>



<p>Enable mod_info which will allow you to see lots of useful debugging information</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo a2enmod info</pre></div>



<p>Finally, enable the site and restart apache</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}">sudo a2ensite test
sudo systemctl restart apache2</pre></div>



<p>Last step, configure the hosts file on your client</p>



<p>Windows<br>Open notepad as an Administrator<br>Add a line which has</p>



<pre class="wp-block-code"><code>xxx.xxx.xxx.xxx test.example.org</code></pre>



<p>&#8230; swapping in your server ip address and the domain name you chose above.</p>



<p>Go to these addresses and see if it works</p>



<h3 class="wp-block-heading">test.example.org</h3>



<figure class="wp-block-image size-full is-resized"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-15.png"><img loading="lazy" decoding="async" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-15.png" alt="" class="wp-image-477" width="365" height="184" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-15.png 487w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-15-300x151.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-15-150x75.png 150w" sizes="(max-width: 365px) 100vw, 365px" /></a></figure>



<h3 class="wp-block-heading">test.example.org/server-status</h3>



<figure class="wp-block-image size-full is-resized"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-16.png"><img loading="lazy" decoding="async" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-16.png" alt="" class="wp-image-478" width="424" height="219" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-16.png 847w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-16-300x155.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-16-768x396.png 768w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-16-150x77.png 150w" sizes="(max-width: 424px) 100vw, 424px" /></a></figure>



<h3 class="wp-block-heading"><br>test.example.org/server-info</h3>



<figure class="wp-block-image size-full is-resized"><a href="https://www.sandyscott.net/wp-content/uploads/2020/05/image-17.png"><img loading="lazy" decoding="async" src="https://www.sandyscott.net/wp-content/uploads/2020/05/image-17.png" alt="" class="wp-image-479" width="417" height="285" srcset="https://www.sandyscott.net/wp-content/uploads/2020/05/image-17.png 834w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-17-300x205.png 300w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-17-768x524.png 768w, https://www.sandyscott.net/wp-content/uploads/2020/05/image-17-150x102.png 150w" sizes="(max-width: 417px) 100vw, 417px" /></a></figure>



<p>If that&#8217;s all working, we&#8217;re good to move onto the next step!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2020/05/server-setup-3-install-webserver/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>403 errors with Apache</title>
		<link>https://www.sandyscott.net/2013/05/403-errors-with-apache/</link>
					<comments>https://www.sandyscott.net/2013/05/403-errors-with-apache/#respond</comments>
		
		<dc:creator><![CDATA[Sandy]]></dc:creator>
		<pubDate>Mon, 13 May 2013 22:10:44 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[403]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[forbidden]]></category>
		<category><![CDATA[selinux]]></category>
		<guid isPermaLink="false">http://pops.sandyscott.net/?p=7</guid>

					<description><![CDATA[Here&#8217;s an issue that almost stopped this blog from going up: You&#8217;ve set up a shiny new webserver, installed php, mysql, and it all seems to be going swimmingly.  You&#8217;ve even created phpinfo() file and everything seems to be working. Then you copy something into the html folder, and just...<p> <a class="continue-reading-link" href="https://www.sandyscott.net/2013/05/403-errors-with-apache/"><span>Continue reading</span><i class="crycon-right-dir"></i></a> </p>]]></description>
										<content:encoded><![CDATA[<p>Here&#8217;s an issue that almost stopped this blog from going up:</p>
<p>You&#8217;ve set up a shiny new webserver, installed php, mysql, and it all seems to be going swimmingly.  You&#8217;ve even created phpinfo() file and everything seems to be working.</p>
<p>Then you copy something into the html folder, and just get endless 403 errors when trying to access it.</p>
<p>So you faff around with permissions, users, groups.  No change, nothing works.</p>
<hr />
<p>In my case, SELinux was the devil here.</p>
<p>This ServerFault post shows how to fix it<br />
<a href="http://serverfault.com/questions/296997/completely-random-403-errors-despite-explicit-allow-from-all">ServerFault: Completely random 403 errors despite explicit Allow from all</a></p>
<p>and for more info:<br />
<a href="http://wiki.centos.org/HowTos/SELinux">CentOS Wiki: HowTos > SELinux</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sandyscott.net/2013/05/403-errors-with-apache/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
