{"id":3195,"date":"2016-06-01T14:23:23","date_gmt":"2016-06-01T14:23:23","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=3195"},"modified":"2016-06-01T14:23:23","modified_gmt":"2016-06-01T14:23:23","slug":"set-vhost-centos","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2016\/06\/01\/set-vhost-centos\/","title":{"rendered":"Set up vhost in CentOS"},"content":{"rendered":"<p>Make a vhosts file in \/etc\/httpd\/conf.d<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# nano dominname.conf\n\n<\/pre>\n<p>Add the following<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# file: \/etc\/http\/conf.d\/dominname.conf\n# vhost: geekdecoder.com *.dominname.com\n#NameVirtualHost *:80\n\n&lt;VirtualHost *:80&gt;\n\n  # Admin email, Server Name (domain name) and any aliases\n    ServerName dominname.com\n    ServerAlias www.dominname.com\n    ServerAdmin webmaster@dominname.com\n\n  # Index file and Document Root (where the public files are located)\n    DirectoryIndex index.html index.php\n    DocumentRoot \/home\/dominname\/public_html\n\n  # Custom log file locations\n    LogLevel warn\n    ErrorLog \/home\/dominname\/logs\/error.log\n    CustomLog \/home\/dominname\/logs\/access.log combined\n\n  # Error Documents\n    ErrorDocument 404 \/errors\/404.html\n    ErrorDocument 403 \/errors\/403.html\n\n  &lt;Directory \/&gt;\n    AllowOverride All\n    Options None\n  &lt;\/Directory&gt;\n\n &lt;Directory &quot;\/home\/dominname\/public_html&quot;&gt;\n    Order allow,deny\n    Allow from all\n    Options SymLinksIfOwnerMatch\n    Options -Indexes\n    Options -Includes\n  &lt;\/Directory&gt;\n\n  ScriptAlias \/cgi-bin\/ \/home\/dominname\/public_html\/cgi-bin\/\n  &lt;Location \/cgi-bin&gt;\n  Options +ExecCGI\n  &lt;\/Location&gt;\n\n&lt;\/VirtualHost&gt;\n&lt;VirtualHost *:443&gt;\n        SSLEngine on\n        SSLCertificateFile \/etc\/pki\/tls\/certs\/dominname.crt\n        SSLCertificateKeyFile \/etc\/pki\/tls\/private\/dominname.key\n        &lt;Directory \/home\/dominname\/public_html\/&gt;\n        AllowOverride All\n        &lt;\/Directory&gt;\n        DocumentRoot \/home\/dominname\/public_html\n        ServerName dominname.com\n&lt;\/VirtualHost&gt;\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Make a vhosts file in \/etc\/httpd\/conf.d # nano dominname.conf Add the following # file: \/etc\/http\/conf.d\/dominname.conf # vhost: geekdecoder.com *.dominname.com #NameVirtualHost *:80 &lt;VirtualHost *:80&gt; # Admin email, Server Name (domain name) and any aliases ServerName dominname.com ServerAlias www.dominname.com ServerAdmin webmaster@dominname.com # Index file and Document Root (where the public files are located) DirectoryIndex index.html index.php DocumentRoot &#8230; <a title=\"Set up vhost in CentOS\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2016\/06\/01\/set-vhost-centos\/\" aria-label=\"Read more about Set up vhost in CentOS\">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],"tags":[],"class_list":["post-3195","post","type-post","status-publish","format-standard","hentry","category-apache"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/3195","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=3195"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/3195\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=3195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=3195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=3195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}