{"id":493,"date":"2020-02-09T07:15:55","date_gmt":"2020-02-09T06:15:55","guid":{"rendered":"https:\/\/codedoneright.eu\/?page_id=493"},"modified":"2020-03-11T00:54:43","modified_gmt":"2020-03-10T23:54:43","slug":"web-server","status":"publish","type":"page","link":"https:\/\/codedoneright.eu\/?page_id=493","title":{"rendered":"Web server \u2013 Apache2"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/httpd.apache.org\/images\/httpd_logo_wide_new.png\" alt=\"\"\/><figcaption><a href=\"https:\/\/httpd.apache.org\/\">https:\/\/httpd.apache.org\/<\/a><\/figcaption><\/figure>\n\n\n\n<p>So you want to host a website? Apache web server is something that will allow you to do it. Basically it is an application that serves a website to anybody connecting to your server with a browser. Apache web server can serve a website, a blog to your users or enable them to access email on your server. And much, much more. If you want to host anything you simply need Apache.<\/p>\n\n\n\n<p>Additionally, if you want to use an SSL certificate for encrypting data sent between you (or other users) and your server you simply need control over a website and a domain to prove that you are who you are saying you are.<\/p>\n\n\n\n<p>Nginx is an alternative http server, however, as I prefer Apache this will not be covered. At least for now.<\/p>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Installing Apache <\/h3>\n\n\n\n<p>This part will be straightforward. Use the following command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install apache2<\/code><\/pre>\n\n\n\n<p>After installation is complete your server is ready. Granted, it is configured in the most basic way possible and so far we can only utilize plain html, but it already works.<\/p>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Accessing your website<\/h3>\n\n\n\n<p>Open your web browser and in the address bar type the IP address of your Raspberry Pi web server (or domain address if you have <a href=\"https:\/\/codedoneright.eu\/?page_id=309\">configured DNS<\/a>). You should see a page similar to the below screen shot<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"809\" height=\"1222\" src=\"https:\/\/codedoneright.eu\/wp-content\/uploads\/apache2.png\" alt=\"Apache web server default website\" class=\"wp-image-494\"\/><figcaption>Apache2 web server default website<\/figcaption><\/figure><\/div>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Apache web server basics<\/h3>\n\n\n\n<p>By default Apache2 serves websites from the following folder<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/var\/www\/html\/<\/code><\/pre>\n\n\n\n<p>The default website is placed there to showcase that it is in fact working. You can serve your website from virtually any folder you want, but again <em>\/var\/<\/em> folder and especially <em>\/www\/<\/em> subfolder is a good choice. You need to have a separate folder for each site you plan to host. Like so<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/var\/www\/codedoneright.eu\/PUBLIC_HTML\/\n\/var\/www\/forum.codedoneright.eu\/\netc.<\/code><\/pre>\n\n\n\n<p>When it comes to the number of sites you can host only two things are constraining you \u2013 bandwidth of your internet connection and your server performance. Obviously you will not be able to host a website with hundreds of pages accessed by millions of users on a daily basis, but a small selection of pages for personal or small business use is not out of the question. <\/p>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Allowing Apache2 to access your website<\/h3>\n\n\n\n<p>In order for Apache to serve content from folder that you created for your website it needs access to it. By default whoever saves a file, owns it. If you save files as the user <em>john1234<\/em>, website files will belong to <em>john1234<\/em>.<\/p>\n\n\n\n<p>Apache on the other hand uses a specific user account to access those files. The user is called<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>www-data<\/code><\/pre>\n\n\n\n<p>By default it has permissions to read, so a static, non-interactive page will be displayed normally, but if you want anything more you need to change both permissions, and owner of those files<\/p>\n\n\n\n<p>For each and every folder you create for a website, after you place your files there run the following code<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chown www-data:www-data -R \/var\/www\/your_website_folder\nsudo chmod 775 -R \/var\/www\/your_website_folder<\/code><\/pre>\n\n\n\n<p>The above code will change ownership of the folder and any files within to Apache <em>www-data<\/em> user, and its group. Moreover, it will allow the user and its group to freely modify those files, while allowing other users to only read.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Access to <em>www-data<\/em> owned files<\/h5>\n\n\n\n<p>Your default user, will not be able to modify contents afterwards. Files and folders simply belong to someone else now. In order to allow us to change those files AND retain Apache ownership of them we will add our default user to Apache www-data group with the following command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo usermod -aG www-data $user_name<\/code><\/pre>\n\n\n\n<p>Substitute <em>$user_name<\/em> with the name of user that will modify website files.<\/p>\n\n\n\n<p><strong>CAUTION<\/strong> All modified files will be owned by your current user (or <em>root<\/em> if you used <em>sudo<\/em>), remember to run <em>chown<\/em> command after you are done with changing files.<\/p>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Apache2 website basic configuration<\/h3>\n\n\n\n<p>Apache serves sites that have configuration files in the following folder<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/etc\/apache2\/sites-available\/<\/code><\/pre>\n\n\n\n<p>The most basic config looks like this<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:80>\n        DocumentRoot \/var\/www\/html\n        ErrorLog ${APACHE_LOG_DIR}\/error.log\n        CustomLog ${APACHE_LOG_DIR}\/access.log combined\n&lt;\/VirtualHost>\n<\/code><\/pre>\n\n\n\n<p>Configuration files should be named <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>example.com.conf<\/code><\/pre>\n\n\n\n<p>however, you can name the file anything as long as it has <em>.conf<\/em> suffix.<\/p>\n\n\n\n<p>Having a configuration file in <em>sites-available<\/em> folder is not enough, you also need to enable the site with the following command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo a2ensite example.com<\/code><\/pre>\n\n\n\n<p>Note that you do not have to include <em>.conf<\/em> extension in the command<\/p>\n\n\n\n<p>After enabling the site, Apache creates a link to the config file from <em>sites-available <\/em>to the folder <em>\/etc\/apache2\/sites-enabled\/ <\/em>it will have the same name, however it will be just a link, not the actual file. You can then modify the file either by accessing it through the link or the file directly. Any changes will be written to the file in <em>sites-available<\/em> folder.<\/p>\n\n\n\n<p><strong>CAUTION <\/strong>You need to restart Apache or just reload the config for any changes in your configuration files to take effect. <\/p>\n\n\n\n<p>Use the following command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo service apache2 restart\nor \nsudo service apache2 reload<\/code><\/pre>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Apache config explained \u2013 virtual hosts<\/h3>\n\n\n\n<p>Great feature of Apache 2 web server are Virtual hosts. In short, they allow for configuring as many sites on one server as your bandwidth and server performance allow for. Take a look at the example configuration above. I will explain what those directives mean<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:80>\n...\n&lt;\/VirtualHost><\/code><\/pre>\n\n\n\n<p>This is the <em>frame <\/em>of every website on your server. It will enclose all directives that concern a single page. The fragment <em>*:80<\/em> means any connection via unencrypted connection through a browser (http protocol).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DocumentRoot \/var\/www\/html<\/code><\/pre>\n\n\n\n<p><em>DocumentRoot <\/em>tells the server where exactly is your website. Like in example above it can be <em>\/var\/www\/codedoneright.eu\/PUBLIC_HTML\/<\/em><\/p>\n\n\n\n<p><strong>CAUTION <\/strong>Apache looks for a file called <em>index.html<\/em> or <em>index.php<\/em> in <em>DocumentRoot<\/em> folder to serve it as the landing page. Other files will be ignored for the purpose of serving the initial page. You will get an error message instead of the site if one of those files is not found!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ErrorLog ${APACHE_LOG_DIR}\/error.log\nCustomLog ${APACHE_LOG_DIR}\/access.log combined<\/code><\/pre>\n\n\n\n<p>Those two lines tell Apache where to write log files. You can rename them to whatever you wish. Keep in mind that you should have separate logs for each and every page you have! Do not instruct Apache to write everything into one log file as you will not be able to diagnose problems that way!<\/p>\n\n\n\n<ul><li>ErrorLog \u2013 for errors<\/li><li>CustomLog \u2013 for checking who (what IP) accessed your server and what files were sent (served to a browser)<\/li><\/ul>\n\n\n\n<p>By default Apache saves all log files in the following folder<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/var\/log\/apache2\/<\/code><\/pre>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Serving multiple sites form one web server<\/h3>\n\n\n\n<p>We know how to configure Apache web server to host a single site, how about a second one?<\/p>\n\n\n\n<p>We will simply add an additional VirtualHost to our configuration file or create an additional configuration file. It does not matter which route you will take, but for simplicity sake we will use a single file for all of our VirtualHosts.<\/p>\n\n\n\n<p><strong>CAUTION <\/strong>I will assume you already have a domain, as serving multiple sites only having an IP address is a bit more tricky. Take a look <a href=\"https:\/\/codedoneright.eu\/?page_id=263\">here<\/a> to learn how you can get a free domain, just for testing purposes. And <a href=\"https:\/\/codedoneright.eu\/?page_id=309\">here <\/a>to learn how to configure your domain and create a subdomain.<\/p>\n\n\n\n<p>Look at the below example<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:80>\n        ServerName example.com\n        DocumentRoot \/var\/www\/example.com\n        ErrorLog ${APACHE_LOG_DIR}\/example.com_error.log\n        CustomLog ${APACHE_LOG_DIR}\/example.com_access.log combined\n&lt;\/VirtualHost>\n&lt;VirtualHost *:80>\n        ServerName forum.example.com\n        DocumentRoot \/var\/www\/forum.example.com\n        ErrorLog ${APACHE_LOG_DIR}\/forum.example.com_error.log\n        CustomLog ${APACHE_LOG_DIR}\/forum.example.com_access.log combined\n&lt;\/VirtualHost><\/code><\/pre>\n\n\n\n<p>Now we have two separate websites defined in our config file \u2013 <em>example.com<\/em> and <em>forum.example.com<\/em>. In order for Apache to know what to serve we are using additional two lines<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ServerName example.com\nDocumentRoot \/var\/www\/example.com<\/code><\/pre>\n\n\n\n<ul><li>ServerName \u2013 instructs Apache to use this particular VirtualHost if the user types <em>example.com<\/em> in the address bar<\/li><li>DocumentRoot \u2013 instructs Apache where are files that should be served for this particular VirtualHost (folder with the website)<\/li><\/ul>\n\n\n\n<p><strong>CAUTION <\/strong>remember about changing log file names as well!<\/p>\n\n\n\n<p><strong>CAUTION <\/strong>bear in mind that both addresses, <em>example.com<\/em> and <em>forum.example.com<\/em> need to point to the same IP address in your DNS configuration, see <a href=\"https:\/\/codedoneright.eu\/?page_id=309\">here<\/a> how to point your website address to your router and <a href=\"https:\/\/codedoneright.eu\/?page_id=375\">here <\/a>how to point your router to your server<\/p>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">1 address, 2 websites \u2013 using an alias<\/h3>\n\n\n\n<p>Ok, what if we want to retain a single address and just serve multiple websites by adding <em>\/forum<\/em> to our domain?<\/p>\n\n\n\n<p>That can be done as well but is a bit more tricky. We have to use an alias. In order to do that we need to define it first. We will do that in the following configuration file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/etc\/apache2\/mods-enabled\/alias.conf<\/code><\/pre>\n\n\n\n<p>Default configuration looks as follows and gives us a pretty good idea how aliasing works in Apache web server<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;IfModule alias_module>\n        # Aliases: Add here as many aliases as you need (with no limit). The format is\n        # Alias fakename realname\n        #\n        # Note that if you include a trailing \/ on fakename then the server will\n        # require it to be present in the URL.  So \"\/icons\" isn't aliased in this\n        # example, only \"\/icons\/\".  If the fakename is slash-terminated, then the\n        # realname must also be slash terminated, and if the fakename omits the\n        # trailing slash, the realname must also omit it.\n        #\n        # We include the \/icons\/ alias for FancyIndexed directory listings.  If\n        # you do not use FancyIndexing, you may comment this out.\n\n               Alias \/icons\/ \"\/usr\/share\/apache2\/icons\/\"\n        \n               &lt;Directory \"\/usr\/share\/apache2\/icons\">\n                       Options FollowSymlinks\n                       AllowOverride None\n                       Require all granted\n               &lt;\/Directory>\n        \n&lt;\/IfModule>\n\n# vim: syntax=apache ts=4 sw=4 sts=4 sr noet\n<\/code><\/pre>\n\n\n\n<p>If we want to serve a website from <em>example.com<\/em> and forum from <em>example.com\/forum<\/em> here is what we need to modify in the <em>alias.conf<\/em> file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;IfModule alias_module>\n\n        Alias \/forum \"\/var\/www\/forum.example.com\/\"\n\n        &lt;Directory \"\/var\/www\/forum.example.com\/\">\n                Options FollowSymlinks\n                AllowOverride None\n                Require all granted\n        &lt;\/Directory>\n\n&lt;\/IfModule>\n<\/code><\/pre>\n\n\n\n<p>You can add as many <em>&lt;IfModule alias_module&gt;<\/em> blocks as you need.<\/p>\n\n\n\n<p>And here is how our <em>example.com.conf<\/em> file in <em>sites-enabled<\/em> will look like<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:80>\n        ServerName example.com\n        DocumentRoot \/var\/www\/example.com\n        ErrorLog ${APACHE_LOG_DIR}\/example.com_error.log\n        CustomLog ${APACHE_LOG_DIR}\/example.com_access.log combined\n&lt;\/VirtualHost>\n&lt;VirtualHost *:80>\n        Alias \/forum \"\/var\/www\/forum.example.com\"\n        DocumentRoot \/var\/www\/forum.example.com\n        ErrorLog ${APACHE_LOG_DIR}\/forum.example.com_error.log\n        CustomLog ${APACHE_LOG_DIR}\/forum.example.com_access.log combined\n&lt;\/VirtualHost><\/code><\/pre>\n\n\n\n<p>Not much different, right? We are just substituting <em>ServerName<\/em> directive with <em>Alias<\/em> directive. <\/p>\n\n\n\n<p>Remember that your main website should be at the top. This will be the website that our alias will be added to. Remember that DocumentRoot can be wherever you like as long as it is defined in a VirtualHost.<\/p>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Benefits of aliases on a web server<\/h3>\n\n\n\n<p>In theory you can use multiple VirtualHosts with subdomains defined in them and it will work just as well, but using aliases is more convenient. <\/p>\n\n\n\n<p><strong>One certificate for your whole website<\/strong> \u2013 We will talk about certificates more in just a bit, but for now you have to realize that each domain and subdomain will require separate certification. It can be in a single certificate, but for all intents and purposes you cannot use a certificate issued for <em>example.com<\/em> with <em>forum.example.com<\/em> as they are considered to be separate addresses! On the other hand <em>example.com<\/em> and <em>example.com\/forum<\/em> are not.<\/p>\n\n\n\n<p><strong>Easier configuration<\/strong> \u2013 Aliases use the configuration of the main website so you do not have to add as many lines. Just define an alias, website folder and log files.<\/p>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Now you know how to host a website or two. However, your server is not serving anything other than plain html for now. In the next step we will add PHP and MySQL support. Read on!<\/p>\n\n\n\n<p>Most services detailed on this page require using http service in one way or another. You have to learn how to use an http web server in order to follow along. If you have any questions write them in comments so that others can benefit from answers as well.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So you want to host a website? Apache web server is something that will allow you to do it. Basically it is an application that serves a website to anybody connecting to your server with a browser. Apache web server&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":483,"menu_order":10,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Web server \u2013 Apache2 host your personalised website &#8212; Code Done Right!<\/title>\n<meta name=\"description\" content=\"Learn the basics of hosting a web server with this easy tutorial. Hosting a basic website, blog or portfolio showcase was never this easy!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codedoneright.eu\/?page_id=493\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Web server \u2013 Apache2 host your personalised website &#8212; Code Done Right!\" \/>\n<meta name=\"twitter:description\" content=\"Learn the basics of hosting a web server with this easy tutorial. Hosting a basic website, blog or portfolio showcase was never this easy!\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/httpd.apache.org\/images\/httpd_logo_wide_new.png\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codedoneright.eu\/?page_id=493\",\"url\":\"https:\/\/codedoneright.eu\/?page_id=493\",\"name\":\"Web server \u2013 Apache2 host your personalised website &#8212; Code Done Right!\",\"isPartOf\":{\"@id\":\"https:\/\/codedoneright.eu\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codedoneright.eu\/?page_id=493#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codedoneright.eu\/?page_id=493#primaryimage\"},\"thumbnailUrl\":\"https:\/\/httpd.apache.org\/images\/httpd_logo_wide_new.png\",\"datePublished\":\"2020-02-09T06:15:55+00:00\",\"dateModified\":\"2020-03-10T23:54:43+00:00\",\"description\":\"Learn the basics of hosting a web server with this easy tutorial. Hosting a basic website, blog or portfolio showcase was never this easy!\",\"breadcrumb\":{\"@id\":\"https:\/\/codedoneright.eu\/?page_id=493#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codedoneright.eu\/?page_id=493\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codedoneright.eu\/?page_id=493#primaryimage\",\"url\":\"https:\/\/httpd.apache.org\/images\/httpd_logo_wide_new.png\",\"contentUrl\":\"https:\/\/httpd.apache.org\/images\/httpd_logo_wide_new.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codedoneright.eu\/?page_id=493#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codedoneright.eu\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Server features\",\"item\":\"https:\/\/codedoneright.eu\/?page_id=483\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Web server \u2013 Apache2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codedoneright.eu\/#website\",\"url\":\"https:\/\/codedoneright.eu\/\",\"name\":\"Code Done Right!\",\"description\":\"Raspberry Pi server guides\",\"publisher\":{\"@id\":\"https:\/\/codedoneright.eu\/#\/schema\/person\/50378701e349dbd5d40888bc5b532568\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codedoneright.eu\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/codedoneright.eu\/#\/schema\/person\/50378701e349dbd5d40888bc5b532568\",\"name\":\"CodeDoneRight\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codedoneright.eu\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/codedoneright.eu\/wp-content\/uploads\/www_icon.png\",\"contentUrl\":\"https:\/\/codedoneright.eu\/wp-content\/uploads\/www_icon.png\",\"width\":120,\"height\":120,\"caption\":\"CodeDoneRight\"},\"logo\":{\"@id\":\"https:\/\/codedoneright.eu\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/codedoneright.eu\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Web server \u2013 Apache2 host your personalised website &#8212; Code Done Right!","description":"Learn the basics of hosting a web server with this easy tutorial. Hosting a basic website, blog or portfolio showcase was never this easy!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codedoneright.eu\/?page_id=493","twitter_card":"summary_large_image","twitter_title":"Web server \u2013 Apache2 host your personalised website &#8212; Code Done Right!","twitter_description":"Learn the basics of hosting a web server with this easy tutorial. Hosting a basic website, blog or portfolio showcase was never this easy!","twitter_image":"https:\/\/httpd.apache.org\/images\/httpd_logo_wide_new.png","twitter_misc":{"Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/codedoneright.eu\/?page_id=493","url":"https:\/\/codedoneright.eu\/?page_id=493","name":"Web server \u2013 Apache2 host your personalised website &#8212; Code Done Right!","isPartOf":{"@id":"https:\/\/codedoneright.eu\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codedoneright.eu\/?page_id=493#primaryimage"},"image":{"@id":"https:\/\/codedoneright.eu\/?page_id=493#primaryimage"},"thumbnailUrl":"https:\/\/httpd.apache.org\/images\/httpd_logo_wide_new.png","datePublished":"2020-02-09T06:15:55+00:00","dateModified":"2020-03-10T23:54:43+00:00","description":"Learn the basics of hosting a web server with this easy tutorial. Hosting a basic website, blog or portfolio showcase was never this easy!","breadcrumb":{"@id":"https:\/\/codedoneright.eu\/?page_id=493#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codedoneright.eu\/?page_id=493"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codedoneright.eu\/?page_id=493#primaryimage","url":"https:\/\/httpd.apache.org\/images\/httpd_logo_wide_new.png","contentUrl":"https:\/\/httpd.apache.org\/images\/httpd_logo_wide_new.png"},{"@type":"BreadcrumbList","@id":"https:\/\/codedoneright.eu\/?page_id=493#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codedoneright.eu\/"},{"@type":"ListItem","position":2,"name":"Server features","item":"https:\/\/codedoneright.eu\/?page_id=483"},{"@type":"ListItem","position":3,"name":"Web server \u2013 Apache2"}]},{"@type":"WebSite","@id":"https:\/\/codedoneright.eu\/#website","url":"https:\/\/codedoneright.eu\/","name":"Code Done Right!","description":"Raspberry Pi server guides","publisher":{"@id":"https:\/\/codedoneright.eu\/#\/schema\/person\/50378701e349dbd5d40888bc5b532568"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codedoneright.eu\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/codedoneright.eu\/#\/schema\/person\/50378701e349dbd5d40888bc5b532568","name":"CodeDoneRight","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codedoneright.eu\/#\/schema\/person\/image\/","url":"https:\/\/codedoneright.eu\/wp-content\/uploads\/www_icon.png","contentUrl":"https:\/\/codedoneright.eu\/wp-content\/uploads\/www_icon.png","width":120,"height":120,"caption":"CodeDoneRight"},"logo":{"@id":"https:\/\/codedoneright.eu\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/codedoneright.eu"]}]}},"_links":{"self":[{"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/pages\/493"}],"collection":[{"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codedoneright.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=493"}],"version-history":[{"count":28,"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/pages\/493\/revisions"}],"predecessor-version":[{"id":984,"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/pages\/493\/revisions\/984"}],"up":[{"embeddable":true,"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/pages\/483"}],"wp:attachment":[{"href":"https:\/\/codedoneright.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}