{"id":4837,"date":"2019-05-31T08:58:09","date_gmt":"2019-05-31T03:28:09","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=4837"},"modified":"2019-05-31T09:22:03","modified_gmt":"2019-05-31T03:52:03","slug":"setup-a-new-virtual-host-domain-in-lampp-server","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/setup-a-new-virtual-host-domain-in-lampp-server\/","title":{"rendered":"Setup a new Virtual Host domain in LAMPP Server"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Setup a new Virtual Host domain in LAMPP Server<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Date posted : 31\/05\/2019<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">In this post, we will be explaining how to setup a new virtual host domain in lampp server<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/05\/lampp-thumbnail.gif\" alt=\"\" class=\"wp-image-4838\" width=\"341\" height=\"273\"\/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">What is VirtualHost:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Virtual host allows us to use an alias name for your website, configure the document root path of your actual website contents and log files name to write etc., <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also we can add multiple domains in configuration section. So that we can host many websites in apache web service in order to serve your domains publicly.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Creating a new virtual host<\/strong><\/h4>\n\n\n\n<h4 class=\"wp-block-heading\">Step 1<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Open \/opt\/lampp\/etc\/httpd.conf file<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Find and uncomment the&nbsp;<strong>#<\/strong>(hash) sign present to include the \u201chttpd-vhosts.conf\u201d file. It will look like below.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Virtual hosts\nInclude etc\/extra\/httpd-vhosts.conf<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Step 2<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Create httpd-vhosts.conf file is its not there already.&nbsp;Open it and copy the below lines of code.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;VirtualHost *:80>\n        ServerName pheonixsolutions.com\n        ServerAlias www.pheonixsolutions.com\n        ServerAdmin webmaster@localhost\n        DocumentRoot \"\/opt\/lampp\/htdocs\/pheonix\"\n        ErrorLog \"logs\/pheonixsolutions.com-error_log\"\n        CustomLog \"logs\/pheonixsolutions.com-access_log\" common\n&lt;\/VirtualHost><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Please don&#8217;t forget to replace your own domain name and log file names.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 3<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Restart LAMPP server<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ sudo \/opt\/lampp\/lampp restart<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now verify your domain in browser by accessing <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/pheonixsolutions.com\/\" target=\"_blank\">http:\/\/pheonixsolutions.com\/<\/a>. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks for using&nbsp;<a href=\"https:\/\/pheonixsolutions.com\/\">pheonix solutions<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You find this tutorial helpful? Share with your friends to keep it alive.<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Setup a new Virtual Host domain in LAMPP Server Date posted : 31\/05\/2019 In this post, we will be explaining [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[676,159],"class_list":["post-4837","post","type-post","status-publish","format-standard","hentry","category-web-architecture","tag-lampp","tag-webserver","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1g1","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4837","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=4837"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4837\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4837"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4837"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}