{"id":20101,"date":"2017-10-17T18:05:24","date_gmt":"2017-10-18T02:05:24","guid":{"rendered":"http:\/\/yummy-wakame.com\/?p=20101"},"modified":"2019-07-08T20:06:06","modified_gmt":"2019-07-09T04:06:06","slug":"how-to-add-custom-virtual-hosts-to-wamp","status":"publish","type":"post","link":"https:\/\/yummy-wakame.com\/weblog\/2017\/10\/how-to-add-custom-virtual-hosts-to-wamp\/","title":{"rendered":"How to add custom Virtual Hosts to WAMP"},"content":{"rendered":"<p><em>(Refers to WAMPSERVER 3.0.6 64-bit)<\/em><\/p>\n<p>If you&#8217;re developing a site in WordPress or similar on your local machine and want to run your site from <em><strong>\/\/customsitename<\/strong><\/em> instead of <strong><em>\/\/localhost<\/em><\/strong>&nbsp;in WAMP every time you test, or even have a bunch of virtual hosts like <strong>\/\/sitename1<\/strong> <strong>\/\/sitename2<\/strong> etc, here&#8217;s how to do set them all up:<\/p>\n<p>Open <em><strong>wamp64\/bin\/apache\/apachex.x.xx\/conf\/extra\/http-vhosts.conf<\/strong><\/em> and make a duplicate of the Virtual host entry for your localhost, paste it <strong>below<\/strong> localhost&#8217;s and change the <em>ServerName<\/em>, <em>DocumentRoot<\/em> and <em>Directory<\/em>&nbsp;to your own names and locations. DO NOT replace localhost, copy and paste it below. Change the names like for example:<\/p>\n<p><code>&lt;VirtualHost *:80&gt;<br \/>\nServerName yoursitename<br \/>\nDocumentRoot C:\/wamp64\/www\/yourfolder<br \/>\n&lt;Directory&nbsp; \"C:\/wamp64\/www\/yourfolder\/\"&gt;<br \/>\nOptions +Indexes +Includes +FollowSymLinks +MultiViews<br \/>\nAllowOverride All Require local<br \/>\n&lt;\/Directory&gt;<br \/>\n&lt;\/VirtualHost&gt;<br \/>\n<\/code><\/p>\n<p>Save.<\/p>\n<p>Then, open <strong><em>C:\\Windows\\System32\\drivers\\etc\\hosts<\/em><\/strong> in administrator mode and below:<\/p>\n<p><code>127.0.0.1       localhost<br \/>\n::1             localhost<\/code><\/p>\n<p>add<\/p>\n<p><code>127.0.0.1       yoursitename<br \/>\n::1             yoursitename<\/code><\/p>\n<p>Save and restart WAMP. Go to your localhost page and you will see it show up as a clickable virtual host.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(Refers to WAMPSERVER 3.0.6 64-bit) If you&#8217;re developing a site in WordPress or similar on your local machine and want to run your site from \/\/customsitename instead of \/\/localhost&nbsp;in WAMP every time you test, or even have a bunch of virtual hosts like \/\/sitename1 \/\/sitename2 etc, here&#8217;s how to do set them all up: Open [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":20170,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[235,238,299],"tags":[],"class_list":["post-20101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nifty-hacks-and-tips","category-web-development","category-website-hosting"],"_links":{"self":[{"href":"https:\/\/yummy-wakame.com\/weblog\/wp-json\/wp\/v2\/posts\/20101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yummy-wakame.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yummy-wakame.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yummy-wakame.com\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yummy-wakame.com\/weblog\/wp-json\/wp\/v2\/comments?post=20101"}],"version-history":[{"count":0,"href":"https:\/\/yummy-wakame.com\/weblog\/wp-json\/wp\/v2\/posts\/20101\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/yummy-wakame.com\/weblog\/wp-json\/wp\/v2\/media\/20170"}],"wp:attachment":[{"href":"https:\/\/yummy-wakame.com\/weblog\/wp-json\/wp\/v2\/media?parent=20101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yummy-wakame.com\/weblog\/wp-json\/wp\/v2\/categories?post=20101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yummy-wakame.com\/weblog\/wp-json\/wp\/v2\/tags?post=20101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}