Can't make live/publish my server on the web
Posted by: Anonymous User (92.80.251.---)
Date: November 20, 2019 08:58PM

Hello , users of WAMP , i just want to publish a site and I cant quite succeed to do so , i follow many tutorials along the way and still cant sort it out , I believe those are old and dont work anymore.
My concern is , that , I have added a virtual hosts , it appers right after i click on the wamp (left mouse click) , and it shows the server , as is working with a internet shortcut icon , but when i check it on other devices , it gaves me the error that it cannnot find the IP of the server, I have also inserted in my /drivers/etc/hosts/ file the ip 127.0.0.1 and the domain , ( with the localhost as main site of the file ) , and secondly my site right before localhost , but doenst work out , the error that appers on the server when i connect is : ERR_NAME_NOT_RESOLVED , and also I inserted into /conf/extra the file :


ServerAdmin mail@yourdomain.com
DocumentRoot "c:\wamp\www"
ServerName mysite.local
ErrorLog "logs/yourdomain.com.log"
CustomLog "logs/yourdomain.com-access.log" common

(yourdomain is my site)
Do you guys have any tips, new tips of how i can solve this and help me to publish my server on-line?
It will be greatly appreciated your answers , Thanks.



the httpd.vhosts.conf file


#
<VirtualHost *:80>
ServerName www.sportoods.com
DocumentRoot "c:/wamp64/www/sport"
<Directory "c:/wamp64/www/sport/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>




This is just the default part (i also changed the site name, created virtual host as said above , just informative purpose(i also tried with document and directory and changed to /www/myfolder, and /www/myfolder/ and still doesnt work, Do i have to change INSTALL DIR? Or is default?



Edited 9 time(s). Last edit at 11/30/2019 05:40AM by sergiu3.

Options: ReplyQuote
Re: Can't make live/publish my server on the web
Posted by: RiggsFolly (Moderator)
Date: November 20, 2019 09:16PM

Hi

Please show us ALL the httpd-vhosts.conf file.


NOTE

DocumentRoot "c:\wamp\www"

is not right if this was supposed to be your Virtual Hosts definition. A VH must be placed in a folder OTHER than the www folder

So maybe
DocumentRoot "c:/wamp/www/domain"


Or you can read THE NEED for VIRTUAL HOSTS

---------------------------------------------------------------------------------------------
(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 11/20/2019 09:25PM by RiggsFolly.

Options: ReplyQuote
Re: Can't make live/publish my server on the web
Posted by: Anonymous User (92.80.251.---)
Date: November 20, 2019 10:12PM

Document root and also directroy is with install dir , you are reffering to httpd vhosts.conf or the httpd.conf file? Where is this change is supposed to take place? In what file? I mean , do i have to change $INSTALL_DIR , or leave it just like that ( in the httpd vhosts.conf) as you mentioned dociment root with c:/wamp64/ww/file , but mine is with $INSTALL_DIR , is any issue with that?
BTW: I also tried in the vhost.conf file , to enter with my folder and didnt work , i did for both directory and document root , The content on the web it works , but it fails to publish , like its something wrong with the connection, IP redirect or something , though in the drivers/hosts file is the address is 127.0.0.1 mydomain.com , and it should work but doesnt.



Edited 4 time(s). Last edit at 11/20/2019 10:22PM by sergiu3.

Options: ReplyQuote
Re: Can't make live/publish my server on the web
Posted by: Otomatic (Moderator)
Date: November 21, 2019 09:17AM

Hi,

Your
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www/sitecontent"
<Directory "${INSTALL_DIR}/www/sitecontent/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
is not the original localhost VirtualHost, you have modified it.
The virtualHost localhost must never be modified, it must remain as it was when it was installed.
This is the default VirtualHost and should not be accessible from outside, so Local Require should not be modified.

You have a tool integrated into Wampserver that allows you to create VirtualHost in three clicks, you have to use it and not do anything anyhow.
In addition, your local sites have no obligation to be in wamp/www/, they can be located in any folder on your disk.

See The need for Virtual Host and Wampserver 3 - Create or add a VirtualHost

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Can't make live/publish my server on the web
Posted by: Anonymous User (92.80.250.---)
Date: November 21, 2019 08:48PM

I checked it , so what next?I added a Virtual Host manually , (the icon with the internet iconn displays , as its live , but isnt) .

Options: ReplyQuote
Re: Can't make live/publish my server on the web
Posted by: RiggsFolly (Moderator)
Date: November 21, 2019 09:18PM

Please show us the complete http-vhosts.conf file

You can access it using

left click wampmanager->Apache->http-vhosts.conf and it will open in your editor

---------------------------------------------------------------------------------------------
(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: Can't make live/publish my server on the web
Posted by: Anonymous User (92.80.250.---)
Date: November 21, 2019 09:20PM

here is




#
<VirtualHost *:80>
ServerName www.sportoods.com
DocumentRoot "c:/wamp64/www/sport"
<Directory "c:/wamp64/www/sport/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>



Edited 2 time(s). Last edit at 11/30/2019 05:40AM by sergiu3.

Options: ReplyQuote
Re: Can't make live/publish my server on the web
Posted by: RiggsFolly (Moderator)
Date: November 21, 2019 09:41PM

So where is the VH for localhost

---------------------------------------------------------------------------------------------
(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: Can't make live/publish my server on the web
Posted by: Anonymous User (92.80.250.---)
Date: November 21, 2019 10:14PM

Is in the httpd vhost conf..2 files

Options: ReplyQuote
Re: Can't make live/publish my server on the web
Posted by: Anonymous User (92.80.250.---)
Date: November 21, 2019 10:18PM

I did all the steps that are on both tutorials , still doesnt work , can you guys explain me from the starrt on how to get the site live?Thanks..

Options: ReplyQuote
Re: Can't make live/publish my server on the web
Posted by: RiggsFolly (Moderator)
Date: November 22, 2019 11:40AM

Please show us the complete httpd-vhosts.conf file

---------------------------------------------------------------------------------------------
(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: Can't make live/publish my server on the web
Posted by: Anonymous User (92.80.248.---)
Date: November 30, 2019 05:39AM

Original file


#
<VirtualHost *:80>
	ServerName www.sportgoods.com
	DocumentRoot "c:/wamp64/www/sport"
	<Directory  "c:/wamp64/www/sport/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require local
	</Directory>
</VirtualHost>



Edited 1 time(s). Last edit at 11/30/2019 01:29PM by RiggsFolly.

Options: ReplyQuote
Re: Can't make live/publish my server on the web
Posted by: RiggsFolly (Moderator)
Date: November 30, 2019 05:28PM

The httpd-vhosts.conf file is delivered like this

#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    #Require local
	Require all granted
  </Directory>
</VirtualHost>

If you use the tools ( on the WAMPServer localhost homepage ) and add a new Virtual Host it shoudl ADD and not replace entries to this file.

So yours shoudl look like

#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    #Require local
	Require all granted
  </Directory>
</VirtualHost>

<VirtualHost *:80>
	ServerName www.sportgoods.com
        ServerAlias sportgoods.com
	DocumentRoot "${INSTALL_DIR}/www/sport"
        <Directory "${INSTALL_DIR}/www/sport/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require local
	</Directory>
</VirtualHost>

So now you can still access localhost and also your new site

If by LIVE you mean allow access from the internet that can be dangerous if you dont know what you are doing you would just change this line

    Require local

To

    Require all granted

---------------------------------------------------------------------------------------------
(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: Can't make live/publish my server on the web
Posted by: Anonymous User (92.80.248.---)
Date: December 01, 2019 01:52AM

Which line i have to change to all granted?!
On the localhost or on my mainwebsite address? More explicit please
Thanks

Options: ReplyQuote


Sorry, only registered users may post in this forum.