Still getting forbidden and not found using virtual host
Posted by: mikel (---.231.133.40.static.ip.windstream.net)
Date: September 27, 2016 06:44PM

I created a clean WAMP install at c:\wamp64
I put the folders for the specific webpages at f:\www\site1, f:\www\site2,
f:\www\site3
I followed the Add Virtual host steps from this site, along with several others for help.
I am getting forbidden errors
Forbidden. You don't have permission to access /site1 on this server.
for all sites but localhost.
I can create an alias and modify the file c:\wamp64\alias\site1.conf and so on, but that seems to work around the purpose of the virtual host file.
This site is completely internal to my organizations. I am not concerned with require all granted for anything at the moment nor amI concerned about putting my server online. I just need to get things working properly.
ANy help would be appreciated.


1 - Windows version used ( specify the version (XP, Vista, 7, 8, 10) and if 32 or 64 bits )
Windows Server 2012 R2 Standard (64-bit)

2 - Version of Wampserver ( Specify version (2.x, 3.0.x) and if 32 or 64 bits )
Wampserver 3.0.4_x64

3 - Apache version (please specify version)
Apache 2.4.18

4 - PHP version (please specify version)
PHP 5.6.19-7.0.4 using 5.6.19

5 - MySQL version (Specify Version)
MySQL 5.7.11

6 - What color is the WampServer icon (in the notification area of the taskbar)
Green with white border. The server is online

7 - in the file c: \ Windows \ System32 \ drivers \ etc \ hosts, what are the active lines * on the field [localhost]?
127.0.0.1 localhost
::1 localhost

127.0.0.1 site 1
::1 site 1

127.0.0.1 site 2
::1 site 2

127.0.0.1 site 3
::1 site 3

If green Wampserver icon and using the menu of this icon:
8 - Do you have access to localhost (Main Page Home WampServer)?
Yes

9 - Do you have access to phpMyAdmin?
No. Forbidden. You don't have permission to access /phpmyadmin on this server.

- 10 - If you are referring to an error message , thank you for the wording EXACT FULL and the error
Forbidden. You don't have permission to access /site1 on this server.
Forbidden. You don't have permission to access /site2 on this server.
Forbidden. You don't have permission to access /site3 on this server.

- 11 - If you use a Anti- virus and / or a Firewall, thank you to give the names of these
ESET File Security
Ver. 4.5.12017.0

- 12 - What is the full path to the installation of Wampserver (for example D: \ wamp \)
c:\wamp64


Below are the contents of the httpd.conf (comment lines (#) have been removed for space) and the httpd-vhosts.conf


httpd-vhosts.conf
#
# Virtual Hosts
#

<VirtualHost *:80>
ServerName localhost
DocumentRoot C:/wamp64/www
<Directory "C:/wamp64/www/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>

</VirtualHost>

<VirtualHost *:80>
ServerName site1
DocumentRoot f:/www/site1
<Directory "f:/www/site1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName site2
DocumentRoot f:/www/site2
<Directory "f:/www/site2/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName site3
DocumentRoot f:/www/site3
<Directory "f:/www/site3/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>



httpd.conf

ServerSignature On
ServerTokens Full

ServerRoot "C:/wamp64/bin/apache/apache2.4.18"

Define APACHE24 Apache2.4

Listen 0.0.0.0:80
Listen [::0]:80

LoadModule access_compat_module modules/mod_access_compat.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule allowmethods_module modules/mod_allowmethods.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule auth_form_module modules/mod_auth_form.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_core_module modules/mod_authn_core.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authn_socache_module modules/mod_authn_socache.so
#LoadModule authnz_fcgi_module modules/mod_authnz_fcgi.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule authz_core_module modules/mod_authz_core.so
#LoadModule authz_dbd_module modules/mod_authz_dbd.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
#LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule buffer_module modules/mod_buffer.so
LoadModule cache_module modules/mod_cache.so
LoadModule cache_disk_module modules/mod_cache_disk.so
#LoadModule cache_socache_module modules/mod_cache_socache.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule charset_lite_module modules/mod_charset_lite.so
#LoadModule data_module modules/mod_data.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule dav_lock_module modules/mod_dav_lock.so
#LoadModule dbd_module modules/mod_dbd.so
#LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
#LoadModule dumpio_module modules/mod_dumpio.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule filter_module modules/mod_filter.so
#LoadModule http2_module modules/mod_http2.so
#LoadModule headers_module modules/mod_headers.so
#LoadModule heartbeat_module modules/mod_heartbeat.so
#LoadModule heartmonitor_module modules/mod_heartmonitor.so
#LoadModule ident_module modules/mod_ident.so
#LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
#LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
#LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
#LoadModule ldap_module modules/mod_ldap.so
#LoadModule logio_module modules/mod_logio.so
LoadModule log_config_module modules/mod_log_config.so
#LoadModule log_debug_module modules/mod_log_debug.so
#LoadModule log_forensic_module modules/mod_log_forensic.so
#LoadModule lua_module modules/mod_lua.so
#LoadModule macro_module modules/mod_macro.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_express_module modules/mod_proxy_express.so
#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
#LoadModule proxy_html_module modules/mod_proxy_html.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
#LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
#LoadModule ratelimit_module modules/mod_ratelimit.so
#LoadModule reflector_module modules/mod_reflector.so
#LoadModule remoteip_module modules/mod_remoteip.so
#LoadModule request_module modules/mod_request.so
#LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule rewrite_module modules/mod_rewrite.so
#LoadModule sed_module modules/mod_sed.so
#LoadModule session_module modules/mod_session.so
#LoadModule session_cookie_module modules/mod_session_cookie.so
#LoadModule session_crypto_module modules/mod_session_crypto.so
#LoadModule session_dbd_module modules/mod_session_dbd.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
#LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
#LoadModule socache_dbm_module modules/mod_socache_dbm.so
#LoadModule socache_memcache_module modules/mod_socache_memcache.so
#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule ssl_module modules/mod_ssl.so
#LoadModule status_module modules/mod_status.so
#LoadModule substitute_module modules/mod_substitute.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule version_module modules/mod_version.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule watchdog_module modules/mod_watchdog.so
#LoadModule xml2enc_module modules/mod_xml2enc.so

LoadModule php5_module "C:/wamp64/bin/php/php5.6.19/php5apache2_4.dll"

<IfModule unixd_module>
User daemon
Group daemon

</IfModule>

ServerAdmin admin@mysties.int

ServerName localhost:80

<Directory />
AllowOverride none
Require all granted
</Directory>

HostnameLookups Off

DocumentRoot "F:/www"
<Directory "F:www/">
Options +Indexes +FollowSymLinks

AllowOverride all

# onlineoffline tag - don't remove
Require all granted
</Directory>

<IfModule dir_module>
DirectoryIndex index.php index.php3 index.html index.htm
</IfModule>

<Files ".ht*">
Require all denied
</Files>

ErrorLog "C:/wamp64/logs/apache_error.log"

LogLevel warn

<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common

<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>

CustomLog "C:/wamp64/logs/access.log" common
</IfModule>

<IfModule alias_module>
ScriptAlias /cgi-bin/ "C:/wamp64/cgi-bin/"

</IfModule>

<IfModule cgid_module>
</IfModule>

<Directory "C:/wamp64/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>

<IfModule mime_module>
TypesConfig conf/mime.types
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3

#AddHandler cgi-script .cgi

#AddHandler type-map var

</IfModule>

#MaxRanges unlimited

EnableSendfile off

AcceptFilter http none
AcceptFilter https none

# Fancy directory listings
Include conf/extra/httpd-autoindex.conf

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

Include "C:/wamp64/alias/*"

Options: ReplyQuote
Re: Still getting forbidden and not found using virtual host
Posted by: RiggsFolly (Moderator)
Date: September 27, 2016 10:01PM

Hi,

As I see you have made some amendments to httpd.conf, all of whicg are unnecessary and some, actually dangerous, can I suggest that you start again from scratch.

Uninstall WAMPServer and manually delete the C:/wamp64 folder to ensure all is removed.


First make sure you have all the MSVC C/C++ runtimes installed for both 32 and 64 bit code See this post for details



Then install WAMPServer 3.0.6, the latest version of WAMPServer from sourceforge or the backup repository here

Then the first thing you do is check that when your run WAMPServer and launch localhost you see the WAMPServer homepage.
Then check that phpMyAdmin works.

Make no amendments to httpd.conf as non should be necessary


If anything does not work, report back with any problems.


Once you are sure the base install works, then attempt to add the Virtual Host definitions for your sites.
Do this by using the tool provide. A link to which is on the wampserver homepage under TOOLS list called Add Virtual Host
Follow the on page instructions.

If you then get any issues report back.

Now when you want to open one or more of the working Virtual Hosts up to the internet or you network you then apply these access right changes to the Virtual Host definitions where they belong along the lines of

<VirtualHost *:80>
ServerName site1
DocumentRoot f:/www/site1
    <Directory "f:/www/site1/">
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride All

        # for access allowed from anywhere in the universe
        Require all granted

        # or for for access from just your subnet
        Require ip 192.168.1

    </Directory>
</VirtualHost>

---------------------------------------------------------------------------------------------
(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: Still getting forbidden and not found using virtual host
Posted by: mikel (---.231.133.40.static.ip.windstream.net)
Date: September 28, 2016 02:45AM

Thank you for your quick response.

I should mention I could access phpmyadmin from the local machine, just nowhere else. Sorry for the confusion. Again, not worried about security right now as this is completely internal to my company.

See below for answers. I got as far as creating a site. The site is not found.

RiggsFolly Wrote:
-------------------------------------------------------
> Hi,
>
> As I see you have made some amendments to
> httpd.conf, all of whicg are unnecessary and some,
> actually dangerous, can I suggest that you start
> again from scratch.
>
> Uninstall WAMPServer and manually delete the
> C:/wamp64 folder to ensure all is removed.
DONE

> First make sure you have all the MSVC C/C++
> runtimes installed for both 32 and 64 bit code
> [url=http://forum.wampserver.com/read.php?2,138295
> ]See this post for details[/url]
DONE. Added 2010, 2012 and 2013 x64 and x86 and 2015 x86

> Then install WAMPServer 3.0.6, the latest version
> of WAMPServer from sourceforge or
> [url=http://wampserver.aviatechno.net/]the backup
> repository here[/url]
DOWNLOADED AND DONE.

> Then the first thing you do is check that when
> your run WAMPServer and launch localhost you see
> the WAMPServer homepage.
DONE. WORKS. Works from another PC if I change Require local to Require all granted. Again, not worried about security as this is internal.

> Then check that phpMyAdmin works.
Yes. Works locally but not from another PC.
>
> [color=red]Make no amendments to httpd.conf as non
> should be necessary[/color]
No changes made.


> If anything does not work, report back with any
> problems.
No issues thus far
>
> Once you are sure the base install works, then
> attempt to add the Virtual Host definitions for
> your sites.
> Do this by using the tool provide. A link to which
> is on the wampserver homepage under TOOLS list
> called [b]Add Virtual Host[/b]
> Follow the on page instructions.
>
> If you then get any issues report back.
DONE.
used the name site1
path is f:/www/site1

Getting the error - The requested URL /site1 was not found on this server from another computer.
On the localhost, I can click on the Virtual Host menu option and access the site, though all is see is /site1 as the address. Which I guess doesn't matter, though it would be nice to type in localhost/site1.


virtual host file is as follows


# Virtual Hosts
#

<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp64/www
<Directory "c:/wamp64/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
#


<VirtualHost *:80>
ServerName site1
DocumentRoot "f:/www/site1"
<Directory "f:/www/site1/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>



Edited 2 time(s). Last edit at 09/28/2016 02:52AM by mikel.

Options: ReplyQuote
Re: Still getting forbidden and not found using virtual host
Posted by: RiggsFolly (Moderator)
Date: September 28, 2016 02:57AM

Do you have a DNS Server available in your company network?

---------------------------------------------------------------------------------------------
(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: Still getting forbidden and not found using virtual host
Posted by: mikel (---.231.133.40.static.ip.windstream.net)
Date: September 28, 2016 03:04AM

RiggsFolly Wrote:
-------------------------------------------------------
> Do you have a DNS Server available in your company
> network?

yes, but right now I'm accessing by ip. I won't change the DNS until I can get this working properly

Options: ReplyQuote
Re: Still getting forbidden and not found using virtual host
Posted by: RiggsFolly (Moderator)
Date: September 28, 2016 03:45AM

You will have to change the DNS, as APache will expect a remote connection to use `site1` and not an ip address.

As a temporary test, amend one PC's HOSTS file to be something like this


192.168.2.10 site1

Where 192.168.2.10 is the ip of the WAMPServer PC

Then try launching `site1` in the browsers address bar of the test PC

---------------------------------------------------------------------------------------------
(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: Still getting forbidden and not found using virtual host
Posted by: mikel (---.sub-70-211-141.myvzw.com)
Date: September 28, 2016 05:47AM

This needs to work with the ip of the local box. I can't do any DNS changes on my own, all is done through my company and they can't do it just to test a server. If you have specific instructions for me on the locl box, I am happy to try, This is a standalone box that has a static IP.
I have used other WAMP versions and I would expect this to work with this version as well. It worked with 3.0.4 though I had to go through c:\wamp64]alias for that to work.
The address is 10.xxx.xxx.50/site1 that's how I need to get to it as well as others inside the network.

Options: ReplyQuote
Re: Still getting forbidden and not found using virtual host
Posted by: RiggsFolly (Moderator)
Date: September 28, 2016 09:53AM

Like I said, a test to prove it will work with a DNS Server change is to :-

Go to another PC

Amend that PC's HOST file

Add to the hosts file

site1 10.xxx.xxx.50
site2 10.xxx.xxx.50
site3 10.xxx.xxx.50

Refresh that PC's DNS Cache
net stop dnscache
net start dnscache


Attempt to access one or all of the sites from a browser on this other PC using the url `site1`
If you can access it then when you make the DNS Server chnages the same will happen.

---------------------------------------------------------------------------------------------
(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-



Edited 1 time(s). Last edit at 09/28/2016 10:00AM by Otomatic.

Options: ReplyQuote
Re: Still getting forbidden and not found using virtual host
Posted by: mikel (---.231.133.40.static.ip.windstream.net)
Date: September 28, 2016 05:48PM

This did not work. I am taken to the browser search page with suggestions for site 1. i

I can, however, access the wampserver homepage from this computer. if I cliick on the link from the wampserver config page, I get "this page cannot be displayed" error.

This leads to my question, why isn't this working out of the box like the guides read? Shouldn't matter if I have ip or a name as proven by the fact that I can see the wampserver config page.

When this is set up, I will need to access it by ip. I need ip as we have certain pages which show locations of other servers within our company and the platform those are built on don't allow for alias. Only ip.

I don't mean to be argumentative or seem unappreciative, as it's the opposite. I very much appreciate the help. I just need to understand.

Thanks.

Options: ReplyQuote
Re: Still getting forbidden and not found using virtual host
Posted by: RiggsFolly (Moderator)
Date: September 28, 2016 07:09PM

Hi,

why isn't this working out of the box

WAMPServer DID work out of the box, you said you tested it and it worked.

This is not out of the box functionality

When setting up a NON one-box-one-developer system, IT IS YOU that is supposed to know what you are doing. Any support you get from us is voluntary, and should be driven by you reading the manual and understanding what it is you are trying to do. It is not for us to drive this process.

if I cliick on the link from the wampserver config page, I get "this page cannot be displayed" error.

When you are on a PC other than the one running WAMPServer the WAMPServer Homepage is of NO USE to you That page works on the PC running WAMPServer only as it is LOCALHOST based, and if you click on a link in a browser that uses LOCALHOST the browser looks ON THE PC RUNNNING THE BROWSER.


When this is set up, I will need to access it by ip.

You cannot run multiple sites on a single Apache instance using just an ip address. Apache would not know which site you were asking for. Apache needs to be able to match a domain name i.e the url used in the remote browser, to the ServerName in the Virtual Host definition to find and set all the parameters like DocumentRoot etc to server files from the right place.


I need ip as we have certain pages which show locations of other servers within our company and the platform those are built on don't allow for alias

Do these other servers reference these Apache sites, or do these Apache hosted sites reference these other servers?
If these sites reference these other servers then there is no problem.

If its the other way around, then this is a requirement that has as yet NOT BEEN MENTIONED.

I hope this explains why we are suggesting what we are suggesting.

---------------------------------------------------------------------------------------------
(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: Still getting forbidden and not found using virtual host
Posted by: mikel (---.231.133.40.static.ip.windstream.net)
Date: September 28, 2016 07:44PM

Again, thank you for the information. Please, see inline below.

RiggsFolly Wrote:
-------------------------------------------------------

> This is not out of the box functionality
>
> When setting up a NON one-box-one-developer
> system, IT IS YOU that is supposed to know what
> you are doing.
Any support you get from us is
> voluntary, and should be driven by you reading the
> manual and understanding what it is you are trying
> to do. It is not for us to drive this process.
Using a virtual host in completely different then what we did before with WAMP. Again, I'm trying to make it work like I had before using the virtual host as recommended.
IUsing WAMP 2.0, I installed on a box, pointed the info to the www folder and whatever folder under that could be it's "own site" using the same ip, just a different folder. I could goto 10.180.150.50/site1 and site1 would come up. Same with site2 and site 3. With the virtual host, this isn't happening.
This is what I am trying to accomplish Virtual host, but not having the luck. So I guess it's not multiple sites per box, it's ONE site that has folders and I use the ip/folder.



> if I cliick on the link from the wampserver
> config page, I get "this page cannot be displayed"
> error.

>
> When you are on a PC other than the one running
> WAMPServer the WAMPServer Homepage is of NO USE
> to you
That page works on the PC running
> WAMPServer only as it is LOCALHOST based, and if
> you click on a link in a browser that uses
> LOCALHOST the browser looks ON THE PC RUNNNING THE
> BROWSER.
I only mentioned because I could get to this and not ip/site1


> When this is set up, I will need to access it
> by ip.

>
> You cannot run multiple sites on a single Apache
> instance using just an ip address. Apache would
> not know which site you were asking for. Apache
> needs to be able to match a domain name i.e the
> url used in the remote browser, to the ServerName
> in the Virtual Host definition to find and set all
> the parameters like DocumentRoot etc to server
> files from the right place.
See above. I would actually type in the ip/filder to get to the site, not just the ip. My fault for not being clear.


> I need ip as we have certain pages which show
> locations of other servers within our company and
> the platform those are built on don't allow for
> alias

>
> Do these other servers reference these Apache
> sites, or do these Apache hosted sites reference
> these other servers?
> If these sites reference these other servers then
> there is no problem.
>
> If its the other way around, then this is a
> requirement that has as yet NOT BEEN MENTIONED.
>
> I hope this explains why we are suggesting what we
> are suggesting.

These sites reference pages in a folder on 1 ip.
I think there's miscommunication on my part, mostly from not completely understanding. Hopefully what I've responded above will clarify. Basically, my issue 10.xxx.xxx.50/site1 should show up other computers and it's not. I'm not sure why. I believe all of my configs are correct according to the guides I've read.

Options: ReplyQuote
Re: Still getting forbidden and not found using virtual host
Posted by: RiggsFolly (Moderator)
Date: September 29, 2016 01:04PM

Well in that case I suggest you remove all the Virtual Hosts EXCEPT the one for localhost

Then you make sure that the Virtual Host for localhost has `Require all granted` and you should be good to go.

---------------------------------------------------------------------------------------------
(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: Still getting forbidden and not found using virtual host
Posted by: mikel (---.231.133.40.static.ip.windstream.net)
Date: September 29, 2016 09:40PM

That works just fine. Simple. Easy.
Thank you for your help. I really appreciate it.

Options: ReplyQuote
Re: Still getting forbidden and not found using virtual host
Posted by: padmahas (---.168.72.182.airtel.in)
Date: October 19, 2016 08:40AM

Hello @mikel and @RiggsFolly,

I read the whole conversation of you two and I'm in exact situation as mikel is in.
In the end RiggsFolly suggested to remove all virtualhost configuration except the localhost. So I did the same. ?As mikel told it worked for him, but its not working for me. Please find below my desktop environment and config files.

Windows 7, 64 bit OS
WAMP 3.0.4 64 bit
Apache 2.4.18 - PHP 5.6.19 - MySQL 5.7.11
PHP 5.6.19 for CLI (Command-Line Interface)

windows hosts file
C:\Windows\System32\drivers\etc\hosts

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

127.0.0.1 localhost
127.0.0.1 moodle
127.0.0.1 osticket
127.0.0.1 moodle_original

http-vhosts.conf file: C:\wamp64\bin\apache\apache2.4.18\conf\extra\httpd-vhosts.conf
#
# Virtual Hosts
#

<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp64/www
<Directory "c:/wamp64/www/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

The below virtualhost entry has been deleted as per the suggestion of RiggsFolly. Previously I has the below virtual host entry for moodle project.

<VirtualHost *:80>
ServerName moodle
DocumentRoot c:/wamp64/www/moodle
<Directory "c:/wamp64/www/moodle">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

How shall I proceed further.

Thank you.

Options: ReplyQuote
Re: Still getting forbidden and not found using virtual host
Posted by: RiggsFolly (Moderator)
Date: October 19, 2016 10:51AM

Hi padmahas,

Can you tell me what you are trying to achieve please.

---------------------------------------------------------------------------------------------
(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


Sorry, only registered users may post in this forum.