{"id":268,"date":"2020-08-01T22:09:31","date_gmt":"2020-08-01T22:09:31","guid":{"rendered":"https:\/\/tomtechproductions.be\/?page_id=268"},"modified":"2020-08-01T22:09:31","modified_gmt":"2020-08-01T22:09:31","slug":"apache-virtual-host","status":"publish","type":"page","link":"https:\/\/blog.tomtechproductions.be\/index.php\/linux\/apache-virtual-host\/","title":{"rendered":"Apache virtual host"},"content":{"rendered":"\n<p>Create a new document in the apache config folder with the name of your site you want to link. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano \/etc\/apache2\/sites-available\/<strong>mysite<\/strong>.conf<\/pre>\n\n\n\n<p>Add the follwing content to the file<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;VirtualHost *:80>\n  ServerName mysite.com\n  DocumentRoot \/var\/www\/mysite\/\n\n  &lt;Directory \/>\n    Options FollowSymLinks\n    AllowOverride All\n  &lt;\/Directory>\n\n  &lt;Directory \/var\/www\/mysite\/>\n    Options FollowSymLinks MultiViews\n    AllowOverride All\n    Order allow,deny\n    allow from all\n  &lt;\/Directory>\n\n&lt;\/VirtualHost><\/pre>\n\n\n\n<p>Enable this new virtual host with the following command. Change it to your filename.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo a2ensite <strong>mysite<\/strong>.conf<\/pre>\n\n\n\n<p>Now we need to restart the apache server.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo service apache restart<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Create a new document in the apache config folder with the name of your site you want to link. sudo nano \/etc\/apache2\/sites-available\/mysite.conf Add the follwing content to the file &lt;VirtualHost *:80> ServerName mysite.com DocumentRoot \/var\/www\/mysite\/ &lt;Directory \/> Options FollowSymLinks AllowOverride All &lt;\/Directory> &lt;Directory \/var\/www\/mysite\/> Options FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all &lt;\/Directory> &hellip; <span class=\"read-more\"><a href=\"https:\/\/blog.tomtechproductions.be\/index.php\/linux\/apache-virtual-host\/\" class=\"more-link\">Read More<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":43,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-268","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/pages\/268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/comments?post=268"}],"version-history":[{"count":0,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/pages\/268\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/pages\/43"}],"wp:attachment":[{"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/media?parent=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}