Giter VIP home page Giter VIP logo

wamp-create-virtualhost's Introduction

Wamp Virtual Host, Create Virtual Host On fly By PHP Form

Wamp Virtual Server Creator, Wamp Auto Virtual Server, Wamp Vhost Creator helps you to create a new virtual server on your machine on the fly. You can create HTTP/HTTPS virtual server by just clicking on few buttons.. This is a single file to Create A Virtual Server for your Development in WAMP.

Although I have been using this script from a long time but I can't ensure that it will works without any error. There is some known error, because everybody knows new WAMP always comes with some new settings and we needs to be set it according to our requirement.

This Script is basically depends on following step:

Get Windows Host File Path : hosts Get Windows Host File Path : httpd.conf Set your project folder : 'D:\wamp\www\myprojects' Set Set Virtual Server Name : dev.mylocalproject.com

#Advance User: Enable SSL : The doc for SSL enable on WAMP is very down on this page.

The 'Wamp_Auto_Virtual_Server' is written in PHP. So basically this is a PHP script only to

open 'hosts' file and add entry "127.0.0.1 dev.mylocalproject.com"

open 'https.conf' file and add entry

# ---------------------------------------------------------
# localhost Projects Settings
# ---------------------------------------------------------

ServerAdmin [email protected]
DocumentRoot 'D:\wamp\www\myprojects'
ServerName dev.mylocalproject.com
ServerAlias dev.mylocalproject.com
  
      Options Indexes Includes FollowSymLinks MultiViews
      AllowOverride all
      Order Allow,Deny
      Allow from all
  
DirectoryIndex index.htm index.html index.shtml .index.php default.php index.php
AccessFileName     .htaccess
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3

and open 'httpd-ssl.conf' (if you setup SSL on WAMP Server)

# ---------------------------------------------------------
# SSL: dev.mylocalproject.com Projects Settings
# ---------------------------------------------------------

SSLEngine on
ServerAdmin [email protected]
DocumentRoot 'D:\wamp\www\myprojects'
ServerName dev.mylocalproject.com
ServerAlias dev.mylocalproject.com
  
      Options Indexes Includes FollowSymLinks MultiViews
      AllowOverride all
      Order Allow,Deny
      Allow from all
  
DirectoryIndex index.htm index.html index.shtml .index.php default.php index.php
AccessFileName     .htaccess
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL  
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"

If you familiar with How to create virtual server on wamp, then you know above code you have to write manually. Wamp_Auto_Virtual_Server ends these manual work and do it for you just click on couple of clicks Yeah!! :)

#IMPORTANT Please create virtual server for 'localhost' itself first, if you using Wamp_Auto_Virtual_Server first time. SSL option will not work until you have not enable SSL on wamp.

#For Smile :) Wamp_Auto_Virtual_Server makes a backup file for every time when you run or make a new virtual server. So if something gonna wrong then you have always option to meet your default file or previous file.

How to Enable SSL on WAMP Window:

This tutorial is actually for a ADVANCE user, who know some terminal based/DOS commands. Hey, don't be sad. You also can give a try.. go ahead but make sure you have all your important backups before start something. Please read the doc [Read more!](./docs/Wamp2-HTTPS-and-SSL-Setup-Step-by-Step guide.pdf)

#For SSI (Server Side Includes, .shtml) If you are using .shtml file and wanna parse on WAMP Server, Create a blank '.htaccess' file and put below code inside.

# BEGIN: APACHE SERVER SIDE INCLUDE (SSI, SHTML)
AddType text/html .shtml
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes
# END: APACHE SERVER SIDE INCLUDE (SSI, SHTML)

# Default execute file
DirectoryIndex index.shtml index.html

#How to create empty '.htaccess' file on windows Start CMD/DOS Go to your project folder or just enter 'cd /' command and press enter Now you are in 'C:' directory Enter 'COPY null > .htaccess' and you will get a blank/empty .htaccess file Just copy and use it.

#How to use You can paste 'vmhost.php' on your 'wamp/www' directory and can run by entering 'http://localhost/vmhost.php' or create a link in /www/index.php to run by open default localhost page. I have included index.php and you can use.

Alt VMHost with Index Alt VMHost Screen

-Thanks Neeraj Singh

wamp-create-virtualhost's People

Contributors

noncent avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

ksarpotdar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.