What is the purpose of the file add_vhost.php in the wamp/www dir
Posted by: SimonT (---.lightspeed.stlsmo.sbcglobal.net)
Date: May 15, 2016 12:02AM

I see a file named add_vhost.php in the wamp/www directory.

What it its purpose?

Can it be used, somehow, to create virtual hosts in a "automated" fashion? If so, how do you go about using it, do you write a custom page to use it?

Simon

Options: ReplyQuote
Re: What is the purpose of the file add_vhost.php in the wamp/www dir
Posted by: RiggsFolly (Moderator)
Date: May 15, 2016 12:09AM

Simon

See the second post in this thread [forum.wampserver.com]

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: What is the purpose of the file add_vhost.php in the wamp/www dir
Posted by: SimonT (---.lightspeed.stlsmo.sbcglobal.net)
Date: May 15, 2016 02:02AM

Okay, thank for the post reference - I missed that item on the wamp localhost page.

I ran it and defined a virtual host.

The last window in the process says:

-----------------------------
The files have been modified. Virtual host bn.com was created
Messages from the console to update DNS:

You may add another VirtualHost by validate "Add a VirtualHost".
However, for these new VirtualHost are taken into account by Apache, you must run item
Restart DNS
from Right-Click Tools menu of Wampmanager icon. (This can unfortunately not be done automatically)
-------------------------

I know the author is French -- is there a way I can send him a good, native-speaker English version of what he is saying?

I would put it as:

-------------------------------------------------------
The files have been modified and virtual host bn.com was created.

In order for this new host be accessible, you need to Restart the DNS, which is something that can't be done automatically for you.

Right-click on the WAMP icon, then click on the Tools menu item, and then on the Restart DNS item


You can add another VirtualHost by clicking the "Add a VirtualHost" link, above.
-----------------------------------------------------------

Back to my creating a virtual host:

When I click the WAMP icon, hover over Your Virtual Hosts and then click the bn.com item, I get a 500 error:

------------------------------------------------------
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at wampserver@otomatic.net to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
Apache/2.4.18 (Win32) PHP/5.6.19 Server at bn.com Port 80
-------------------------------------------------------

I downloaded wampserver3.0.4_x86_apache2.4.18_mysql5.7.11_php5.6.19-7.0.4.exe yesterday.

I then downloaded and ran the C++ 9, 10, 11, 13, and 14 redist installs. If a "repair" option was offered, I used it.

I then stated WAMP, everything seemed fine.

I've used phpMyAdmin sucessfully and created a database.

Other than going to the local host page - and missing that Add a Virtual Host link - thank you for your reply - I've done nothing else to the WAMP installation except just now creating a virtual host.

Should I, as the message says, send ann email to wampserver@otomatic.net or pursue the matter here, on the forums?

If I should pursue it here, would you recommend me opening a separate topic for it?

---------------------------------------------------------------
Here's what debugging information I could think to include in this post:

In apache_error.log, I see the line:

[Sat May 14 18:22:53.773118 2016] [core:alert] [pid 4948:tid 904] [client 127.0.0.1:50367] C:/wamp/www/bobroot/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

In the apache access.log file, I see:

127.0.0.1 - - [14/May/2016:18:22:53 -0500] "GET / HTTP/1.1" 500 618

I ran the Check httpd.config syntax Tools submenu item, the output was - if you blink you miss it, was Syntax OK

I ran the Check Complier VC, compatibility and ini files, the output was:
------------------------------------

Compiler Visual C++ versions used::


PHP 5.6.19 Compiler => MSVC11 (Visual C++ 2012)

Architecture => x86

is compatible with Apache 2.4.18

PHP 7.0.4 Compiler => MSVC14 (Visual C++ 2015)

Architecture => x86

is compatible with Apache 2.4.18

MySQL Ver 5.7.11 for Win32 on AMD64 (MySQL Community Server (GPL))

Apache 2.4.18 Apache Lounge VC14 Server built: Dec 9 2015 10:17:39

Architecture: 32-bit
---------------------------------------

I ran the Check state of servers, the output was:
--------------------------------------------------

State of services:

The service 'wampapache' is started

The service 'wampmysqld' is started

The service 'dnscache' is started

all services are started - it is OK
---------------------------------------------------

The Show virtualhost examined by Apache menu item outputs:
---------------------------------------------------------

VirtualHost configuration:

Default server: localhost
Virtual Host: localhost
Virtual Host: bn.com
-----------------------------------------------

Show loaded Apache modules:
-------------------------------------------------
Apache loaded modules
Core:
core_module
win32_module
mpm_winnt_module
http_module
so_module

Shared modules:
access_compat_module
actions_module
alias_module
allowmethods_module
asis_module
auth_basic_module
auth_digest_module
authn_core_module
authn_file_module
authz_core_module
authz_groupfile_module
authz_host_module
authz_user_module
autoindex_module
cache_module
cache_disk_module
cgi_module
dir_module
env_module
file_cache_module
include_module
isapi_module
log_config_module
mime_module
negotiation_module
rewrite_module
setenvif_module
userdir_module
vhost_alias_module
php5_module
--------------------------------------------

Test port 80:
-------------------------------------------

***** Test which uses port 80 *****

===== Tested by command netstat filtered on port 80 =====


Test for TCP
Your port 80 is used by a processus with PID = 4636
The processus of PID 4636 is 'httpd.exe' Session: Services
The service of PID 4636 for 'httpd.exe' is 'wampapache'
This service is from Wampserver - It is correct

Test for TCPv6
Your port 80 is used by a processus with PID = 4636
The processus of PID 4636 is 'httpd.exe' Session: Services
The service of PID 4636 for 'httpd.exe' is 'wampapache'
This service is from Wampserver - It is correct

===== Tested by attempting to open a socket on port 80 =====

Your port 80 is not actually used.
----------------------------------------------------------

Is the line: "Your port 80 is not actually used." a possible problem?

Test port 3306:
------------------------------------------------------------
***** Test which uses port 3306 *****

===== Tested by command netstat filtered on port 3306 =====


Test for TCP
Your port 3306 is used by a processus with PID = 4952
The processus of PID 4952 is 'mysqld.exe' Session: Services
The service of PID 4952 for 'mysqld.exe' is 'wampmysqld'
This service is from Wampserver - It is correct

Test for TCPv6
Your port 3306 is used by a processus with PID = 4952
The processus of PID 4952 is 'mysqld.exe' Session: Services
The service of PID 4952 for 'mysqld.exe' is 'wampmysqld'
This service is from Wampserver - It is correct
----------------------------------------------------------

From the Firebug Net console:

------------------------------------------------
Request Headers:
GET / HTTP/1.1
Host: bn.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Connection: keep-alive
Cache-Control: max-age=0

Response Headers:
HTTP/1.1 500 Internal Server Error
Date: Sat, 14 May 2016 23:52:08 GMT
Server: Apache/2.4.18 (Win32) PHP/5.6.19
Content-Length: 618
Connection: close
Content-Type: text/html; charset=iso-8859-1
---------------------------------------------

Simon

Options: ReplyQuote
Re: What is the purpose of the file add_vhost.php in the wamp/www dir
Posted by: SimonT (---.lightspeed.stlsmo.sbcglobal.net)
Date: May 15, 2016 03:07AM

I'm running Win 7 64bit - should I have installed the WAMP 64bit version?

Options: ReplyQuote
Re: What is the purpose of the file add_vhost.php in the wamp/www dir
Posted by: SimonT (---.lightspeed.stlsmo.sbcglobal.net)
Date: May 15, 2016 07:47AM

!!!!!!!!!!!!!!!!!!!!!!!!!!!!11

The problem could not have been any more self evident if it was standing on the top of my monitor waving a flag at me.

The error was about the .htaccess file. --- .htaccess: Invalid command 'Header'


------------------------------------------------------
ErrorDocument 404 "404 page not found"


AddType text/x-server-parsed-html .html


Header append X-FRAME-OPTIONS "SAMEORIGIN"
RewriteEngine on
RewriteCond %{THE_REQUEST} \/index.shtml\ HTTP [NC]
RewriteRule (.*)index.shtml$ /$1 [R=301,L]
RewriteCond %{THE_REQUEST} \/index.html\ HTTP [NC]
RewriteRule (.*)index.html$ /$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^www.bobnovell.com$
RewriteRule ^(.*)$ [www.bobnovell.com] [R=301]
------------------------------------------------------

I deleted the file and now I get something other than the 500 error.

I'll open a new post about the new problem.

Options: ReplyQuote


Sorry, only registered users may post in this forum.