Skip to content

Commit

Permalink
Version 0.6.2
Browse files Browse the repository at this point in the history
- Implement ± Default Hosts
- Allow alternative installation directory (still working on it)
- Improve Help Instructions
- Added edit status to tabs (need to implement undo)
- First steps in theming (not ready yet)
  • Loading branch information
manngo committed Sep 25, 2022
1 parent 1f890ca commit 9810637
Show file tree
Hide file tree
Showing 9 changed files with 289 additions and 151 deletions.
6 changes: 3 additions & 3 deletions compile.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# electron-packager . --overwrite --platform=win32 --arch=x64 --prune=true --extra-resource="resources/fakemail" --out="..\release-builds"
rem electron-packager . --overwrite --platform=win32 --arch=x64 --prune=true --extra-resource="resources/fakemail" --out="..\release-builds"

npm run dist
# cd "../electron-builder/edit-virtual-hosts/";
# mv "mac" "Edit Virtual Hosts macOS";
rem cd "../electron-builder/edit-virtual-hosts/";
rem mv "mac" "Edit Virtual Hosts macOS";
2 changes: 2 additions & 0 deletions data/mamp-default.vhost
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# MAMP !! Do Not Repeat !!
NameVirtualHost *:80
3 changes: 0 additions & 3 deletions data/mamp.vhost
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# MAMP !! Do Not Repeat !!
NameVirtualHost *:80

# MAMP [project]: [domain]

<VirtualHost *:80>
Expand Down
10 changes: 10 additions & 0 deletions data/xampp-default.vhost
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# XAMPP Required Default !! Do Not Repeat !!
<VirtualHost *:80>
ServerName localhost
DocumentRoot "[htdocs]"
<Directory "[htdocs]">
Options Indexes FollowSymLinks Includes execCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
11 changes: 0 additions & 11 deletions data/xampp.vhost
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
# XAMPP Required Default !! Do Not Repeat !!
<VirtualHost *:80>
ServerName localhost
DocumentRoot "[htdocs]"
<Directory "[htdocs]">
Options Indexes FollowSymLinks Includes execCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

# XAMPP [project]: [domain]
<VirtualHost *:80>
ServerName [domain]
Expand Down
76 changes: 47 additions & 29 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@
<button value="misc-text">File</button>
<button value="misc-actions">Actions</button>
</div>
<div id="choose-server-root">
<label for="server-root">Server Root</label>
<input type="text" id="server-root" name="server-root" value="" placeholder="Leave empty for default" title="Full Path to Server Folder">
<button name="server-path">Select Folder …</button>
</div>
<div id="misc">
<select name="server" size="1">
<option value="">Server</option>
<option value="">Choose One</option>
<option value="xampp">XAMPP</option>
<option value="mamp">MAMP</option>
<!--option value="ampps">AMPPS</option-->
Expand All @@ -42,9 +47,11 @@
<form id="hosts-file">
<div class="help">
<h3>Hosts File (etc/host)</h3>
<p>Add:</p>
<pre>127.0.0.1 www.example.com</pre>
<p>or something like it to the bottom of the file</p>
<ol>
<li>Add:
<pre>127.0.0.1 www.example.com</pre>
or something like it to the bottom of the file</li>
</ol>
</div>
<div class="textarea etc">
<textarea name="content">Open hosts file or Select Platform</textarea>
Expand All @@ -53,17 +60,19 @@ <h3>Hosts File (etc/host)</h3>
<form id="httpd-conf">
<div class="help">
<h3>Apache Configuration File (httpd.conf)</h3>
<p>Make sure that you have selected the server (XAMPP or MAMP) from the menu.</p>

<p>Find <a href="doit:find:httpd-vhosts.conf"><code>httpd-vhosts.conf</code></a> and remove the comment(<code>#</code>) at the beginning of the <code>Include</code> (if any).
This gives:</p>
<pre># Virtual hosts
Include etc/extra/httpd-vhosts.conf</pre>
<div class="macos">
<p>(MacOS:) Find <a href="doit:find:User/Group"><code>User/Group</code></a> and change the User and Group to your own. Something like:</p>
<pre>User fred
Group admin</pre>
</div>
<ol>
<li>If you have installed in a non-standard location, enter it in the <strong>Server Root</strong></li>
<li>Make sure that you have selected the server (XAMPP or MAMP) from the menu.</li>
<li>Find <a href="doit:find:httpd-vhosts.conf"><code>httpd-vhosts.conf</code></a> and remove the comment(<code>#</code>) at the beginning of the <code>Include</code> (if any). This gives:
<pre># Virtual hosts</pre>
<pre>Include etc/extra/httpd-vhosts.conf</pre>
</li>
<li class="macos">
(MacOS:) Find <a href="doit:find:User/Group"><code>User/Group</code></a> and change the User and Group to your own. Something like:
<pre>User fred</pre>
<pre>Group admin</pre>
</li>
</ol>
</div>
<div class="textarea etc">
<textarea name="content">Open httpd.conf file or Select Platform</textarea>
Expand All @@ -72,9 +81,12 @@ <h3>Apache Configuration File (httpd.conf)</h3>
<form id="virtual-hosts">
<div class="help">
<h3>Virtual Hosts File (httpd-vhosts.conf)</h3>
<p>Make sure that you have selected the server (XAMPP or MAMP) from the menu.</p>
<p>First, use the <strong>Generator</strong> tab and fill in the details.</p>
<p>Then copy the result and paste it below.</p>
<ol>
<li>If you have installed in a non-standard location, enter it in the <strong>Server Root</strong></li>
<li>Make sure that you have selected the server (XAMPP or MAMP) from the menu.</li>
<li>First, use the <strong>Generator</strong> tab and fill in the details.</li>
<li>Then copy the result and paste it below.</li>
</ol>
</div>
<div class="textarea etc">
<textarea name="content">Open vhosts.conf file or Select Platform</textarea>
Expand All @@ -83,10 +95,13 @@ <h3>Virtual Hosts File (httpd-vhosts.conf)</h3>
<form id="generator">
<div class="help">
<h3>Hosts Generator</h3>
<p>Make sure that you have selected the server (XAMPP or MAMP) from the menu.</p>
<ol>
<li>Make sure that you have selected the server (XAMPP or MAMP) from the menu.</li>
<li>Fill in the details blow and click <strong>Generate</strong></li>
</ol>
</div>
<div class="etc">
<p><label class="server xampp"><input type="checkbox" name="xampp-default" value="1" title="Short Project Name" checked> Include Default Host</label></p>
<p><label class="server xampp"><input type="checkbox" name="vhost-default" value="1" title="Short Project Name" checked> Include Default Host</label></p>
<p><label for="project">Project Name</label><input type="text" id="project" name="project" value="example" placeholder="Short Project Name" title="Short Project Name"></p>
<p><label for="domain">Virtual Domain</label><input type="text" id="domain" name="domain" value="www.example.com" placeholder="Site Domain Name" title="Virtual Domain Name"></p>
<p><label for="root">Document Root</label><input type="text" id="root" name="root" value="…/…/example" placeholder="…/…/example" title="Full Path to Root Folder"><button name="path">Select Folder …</button></p>
Expand All @@ -97,15 +112,18 @@ <h3>Hosts Generator</h3>
<form id="php-ini">
<div class="help">
<h3>PHP Configuration File (php.ini)</h3>
<p>Make sure that you have selected the server (XAMPP or MAMP) from the menu.</p>
<p>Find <a href="doit:find:sendmail_path"><code>sendmail_path</code></a> and remove the comment(<code>;</code>) at the beginning of the line(if any).<br>
Select the part after <code>sendmail_path=</code><br>
Locate your (fake) <a href="doit:open:Sendmail Path:clipboard">sendmail</a> program and add the path at the end inside "quotes".<br>
This gives something like: <code>sendmail_path = "…/…/sendmail"</code>. Paste the resulting path.</p>
<p>While you’re at it, check <a href="doit:find:extension ?= ?.*gd"><code>extension=gd</code></a> and remove the comment(<code>;</code>) at the beginning of the line(if any).<br>
This will enable you to use image functions in PHP.
</p>

<ol>
<li>If you have installed in a non-standard location, enter it in the <strong>Server Root</strong></li>
<li>Make sure that you have selected the server (XAMPP or MAMP) from the menu.</li>
<li>Set the <strong>sendmail path</strong>:
<ul>
<li>Find <a href="doit:find:sendmail_path"><code>sendmail_path</code></a> and remove the comment(<code>;</code>) at the beginning of the line(if any).</li>
<li>Select the part after <code>sendmail_path=</code></li>
<li>Locate your (fake) <a href="doit:open:Sendmail Path:clipboard">sendmail</a> program and add the path at the end inside "quotes".</li>
</ul>
This gives something like: <code>sendmail_path = "…/…/sendmail"</code>. Paste the resulting path.</li>
<li>While you’re at it, check <a href="doit:find:extension ?= ?.*gd"><code>extension=gd</code></a> and remove the comment(<code>;</code>) at the beginning of the line(if any). This will enable you to use image functions in PHP. </li>
</ol>
</div>
<div class="textarea etc">
<textarea name="content">Open php.ini file or Select Platform</textarea>
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "edit-virtual-hosts",
"version": "0.6.0",
"version": "0.6.2",
"description": "Edit Virtual Hosts",
"main": "main.js",
"repository": "https://github.com/manngo/edit-virtual-hosts",
Expand All @@ -23,7 +23,8 @@
"category": "public.app-category.developer-tools",
"target": [
"zip",
"dmg"
"dmg",
"dir"
],
"icon": "images/edit-virtual-hosts.icns"
},
Expand Down
Loading

0 comments on commit 9810637

Please sign in to comment.