{"id":6639,"date":"2022-09-24T22:17:06","date_gmt":"2022-09-24T22:17:06","guid":{"rendered":"https:\/\/www.geekdecoder.com\/?p=6639"},"modified":"2022-09-24T22:17:06","modified_gmt":"2022-09-24T22:17:06","slug":"set-up-virtual-host-on-apache-for-wordpress","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2022\/09\/24\/set-up-virtual-host-on-apache-for-wordpress\/","title":{"rendered":"Install WordPress on Apache (Debian)"},"content":{"rendered":"\n<p>So, the following we run the commands to set up apache for wordpress.<\/p>\n\n\n\n<p>Download and unzip the WordPress package from:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# wget https:\/\/wordpress.org\/latest.tar.gz\n<\/pre><\/div>\n\n\n<p> <br>Then extract the package to the apache root directory:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# tar -xzvf latest.tar.gz --directory \/var\/www\/kdoozle\n<\/pre><\/div>\n\n\n<p>Activate Mod Rewrite.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# sudo a2enmod rewrite\n<\/pre><\/div>\n\n\n<p>Create vhosts.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&lt;VirtualHost *:80&gt;\n    ServerName ipgw.io\n    ServerAlias www.ipgw.io\n    ServerAdmin webmaster@ipgw.io\n    DocumentRoot \/var\/www\/ipgw\n \n    &lt;Directory \/var\/www\/ipgw&gt;\n        Options -Indexes +FollowSymLinks\n        AllowOverride All\n    &lt;\/Directory&gt;\n \n    ErrorLog ${APACHE_LOG_DIR}\/ipgw.io-error.log\n    CustomLog ${APACHE_LOG_DIR}\/ipgw.io-access.log combined\n&lt;\/VirtualHost&gt;\n \n&lt;VirtualHost *:443&gt;\n    ServerAdmin rogerp@local\n    ServerName www.ipgw.io\n    ServerAlias ipgw.io\n    DocumentRoot \/var\/www\/ipgw\n    SSLEngine on\n    SSLCertificateFile \/etc\/pki\/tls\/certs\/ipgw.io.crt\n    SSLCertificateKeyFile \/etc\/pki\/tls\/certs\/ipgw.io.key\n&lt;\/VirtualHost&gt;\n \n&lt;VirtualHost *:443&gt;\n    ServerAdmin rogerp@local\n    ServerName www.ipgw,io\n    ServerAlias ipgw.io\n \n    DocumentRoot \/var\/www\/ipgw\n \n    SSLEngine on\n    SSLCertificateFile \/etc\/pki\/tls\/certs\/ipgw.io.crt\n    SSLCertificateKeyFile \/etc\/pki\/tls\/certs\/ipgw.io.key\n&lt;\/VirtualHost&gt;\n<\/pre><\/div>\n\n\n<p><br>After installing it, you will need to restart Apache services with the command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nservice apache2 restart\n<\/pre><\/div>\n\n\n<p>If needed, you will need to edit the config file and find the directive:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nAllowOverride None\n<\/pre><\/div>\n\n\n<p><br>Change it to:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nAllowOverride All\nOrder allow,deny\nAllow from all\n<\/pre><\/div>\n\n\n<p>Create the Database<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nMariaDB &#x5B;(none)]&gt; CREATE database kdoozle;\nQuery OK, 1 row affected (0.001 sec)\n<\/pre><\/div>\n\n\n<p>Add user and set up permissions.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nMariaDB &#x5B;(none)]&gt; CREATE USER &#039;kdoozle&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;sdsrg54yhs&#039;;\nQuery OK, 0 rows affected (0.032 sec)\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nMariaDB &#x5B;(none)]&gt; GRANT ALL PRIVILEGES ON kdoozle.* to &#039;kdoozle&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;sdsrg54yhs&#039;;\nQuery OK, 0 rows affected (0.017 sec)\n<\/pre><\/div>\n\n\n<p>Next, run the installer by loading the website in the browser.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, the following we run the commands to set up apache for wordpress. Download and unzip the WordPress package from: Then extract the package to the apache root directory: Activate Mod Rewrite. Create vhosts. After installing it, you will need to restart Apache services with the command: If needed, you will need to edit the &#8230; <a title=\"Install WordPress on Apache (Debian)\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2022\/09\/24\/set-up-virtual-host-on-apache-for-wordpress\/\" aria-label=\"Read more about Install WordPress on Apache (Debian)\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,128],"tags":[],"class_list":["post-6639","post","type-post","status-publish","format-standard","hentry","category-apache","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/6639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=6639"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/6639\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=6639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=6639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=6639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}