How to change URL?
Posted by: retherenn (---.vln.skynet.lt)
Date: September 23, 2016 11:51AM

Hello.

Is there a way to change your wamp server URL to something different than "localhosttongue sticking out smileyORTNUMBER"

I have tried a tutorial here [stackoverflow.com] but it doesn't work.

I did everything correctly. But when I try to access my URL it doesn't work.

So is there any other way to change my URL?

Or maybe it's just impossible to do?

Thank you for your answers. P.S. I am using Wamp Server version 2.4



Edited 2 time(s). Last edit at 09/23/2016 11:55AM by RiggsFolly.

Options: ReplyQuote
Re: How to change URL?
Posted by: RiggsFolly (Moderator)
Date: September 23, 2016 12:00PM

Hi

Show us you httpd-vhosts.conf file please

Also can you answer these questions [forum.wampserver.com]

Also have a read of Troubeshooting tips and
The need for Virtual Hosts you may be able to solve your own problem.

---------------------------------------------------------------------------------------------
(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/23/2016 03:58PM by RiggsFolly.

Options: ReplyQuote
Re: How to change URL?
Posted by: retherenn (---.vln.skynet.lt)
Date: September 23, 2016 12:19PM

To be more precise I have added this code to httpd-vhosts.conf folder
<VirtualHost retherenn>
    DocumentRoot "C:/wamp/www/retherenn/"
    ServerName retherenn
    ServerAlias retherenn
    <Directory "C:/wamp/www/retherenn/">
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

But this didn't work. Then I changed this line a little bit, and instead of
<VirtualHost retherenn>

I typed <VirtualHost *:80>

and then I changed this folder

C:/Windows/System32/drivers/etc/hosts

and added 127.0.0.1 retherenn.

But it still doesn't work.

I have tried typing retherenn or [retherenn] or even [www.retherenn] into URL but all I get is either error 404 or that my DNS is finished and can't be connected.

P.S. I also edited httpd.conf file. I changed it from

#Include conf/extra/httpd-vhosts.conf
into
Include conf/extra/httpd-vhosts.conf.

As I said, I am using wampserver 2.4 x86 for windows xp sp3.

And whenever I make some editing and restart the server, the icon is always green.
My apache version is 2.4.4,
PHP version is 5.4.16
and MYSQL version is 5.6.12.

I hope that it's all required information, so that you could help me with my problem.



Edited 3 time(s). Last edit at 09/23/2016 03:55PM by RiggsFolly.

Options: ReplyQuote
Re: How to change URL?
Posted by: RiggsFolly (Moderator)
Date: September 23, 2016 03:57PM

Did you bother to read The need for Virtual Hosts in there are some useful instruction of how to create Virtual Hosts. Can I suggest you read that first and then try to implement a VH as it suggests.

Then if you get probelms please let us know.

---------------------------------------------------------------------------------------------
(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/23/2016 03:58PM by RiggsFolly.

Options: ReplyQuote
Re: How to change URL?
Posted by: retherenn (---.vln.skynet.lt)
Date: September 23, 2016 04:27PM

I have read it. And I have changed everything according to that guide. Except for ';WAMPPROJECTSUBMENU' because there's no such line in my wampmanager.tpl folder. So now my httpd-vhosts file looks like this

<VirtualHost *:80>
    DocumentRoot "C:/wamp/www/retherenn/"
    ServerName retherenn
    ServerAlias retherenn
    <Directory "C:/wamp/www/retherenn/">
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

And I have added these two line to my hosts file
127.0.0.1       retherenn
::1             retherenn

My port is up and running and wampserver logo is green. I also did this

net stop dnscache
net start dnscache

And of course I have done this

# Virtual hosts
#Include conf/extra/httpd-vhosts.conf and changed this line into 
Include conf/extra/httpd-vhosts.conf

But it's still not working. When I try to access my website it shows 404 not found error.



Edited 2 time(s). Last edit at 09/23/2016 04:30PM by RiggsFolly.

Options: ReplyQuote
Re: How to change URL?
Posted by: RiggsFolly (Moderator)
Date: September 23, 2016 04:41PM

Ok,

You read it but not very carefully, it never uses the "Allow" syntax

You are using Apache 2.4 right? So try making this change so it uses Apache 2.4 syntax

<VirtualHost *:80>
    DocumentRoot "C:/wamp/www/retherenn/"
    ServerName retherenn
    ServerAlias retherenn
    <Directory "C:/wamp/www/retherenn/">
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

Dont allow full internet acess to your web site unless you really know what you are doing i.e. "Allow from all" or in 2.4 syntax "Require all granted"

If you want to allow access from other PC's on your local network you can add another Require line

<VirtualHost *:80>
    DocumentRoot "C:/wamp/www/retherenn/"
    ServerName retherenn
    ServerAlias retherenn
    <Directory "C:/wamp/www/retherenn/">
        AllowOverride All
        Require local
        Require ip 192.168.1
    </Directory>
</VirtualHost>

This assumes your subnet starts with `192.168.1` yours may be different

If you actually want to risk allowing the whole world, including all the hacker out there to test your knowledge of PC and Apache security, you can change it to

<VirtualHost *:80>
    DocumentRoot "C:/wamp/www/retherenn/"
    ServerName retherenn
    ServerAlias retherenn
    <Directory "C:/wamp/www/retherenn/">
        AllowOverride All

        Require all granted

    </Directory
</VirtualHost>

Then of course you will need to Port Forward your router to actually allow traffic in through your NAT security

---------------------------------------------------------------------------------------------
(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: How to change URL?
Posted by: retherenn (---.vln.skynet.lt)
Date: September 23, 2016 04:53PM

I have changed my httpd-vhosts file and now it looks like this

<VirtualHost *:80>
    DocumentRoot "C:/wamp/www/retherenn/"
    ServerName retherenn
    ServerAlias retherenn
    <Directory "C:/wamp/www/retherenn/">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

I have already done port forward and my port is opened and visible. I have restarted my server. WampServer logo is green. But the site is not working.



Edited 1 time(s). Last edit at 09/23/2016 05:15PM by RiggsFolly.

Options: ReplyQuote
Re: How to change URL?
Posted by: RiggsFolly (Moderator)
Date: September 23, 2016 05:16PM

Please explain Not working

Something like "when I do this" I get "This error or message"

For a start explain how you are testing this, and also how you are addressing it from a browser not within your network i.e. on the internet

---------------------------------------------------------------------------------------------
(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/23/2016 05:22PM by RiggsFolly.

Options: ReplyQuote
Re: How to change URL?
Posted by: retherenn (---.vln.skynet.lt)
Date: September 23, 2016 05:37PM

By not working I mean that I can't access my page, I get either 404 error (page is not found) or this site can't be reached message. I have been trying to access my page by entering [retherenn] in the URL.

Options: ReplyQuote
Re: How to change URL?
Posted by: Otomatic (Moderator)
Date: September 23, 2016 06:35PM

Hi,

After editing the hosts file, did you restart the DNS server or restart the machine?

Since you have both an older system (Windows XP) and a very old version of Wampserver, you do not have the tools to do it in two clicks!
Open a command window - as administrator (There must be the word administrator in the title bar of the command window) and type the following commands after exit Wampserver
ipconfig /flushdns
net stop dnscache
net start dnscache
Start Wampserver.

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

Options: ReplyQuote
Re: How to change URL?
Posted by: RiggsFolly (Moderator)
Date: September 23, 2016 07:24PM

The url `[retterenn]` shoudl work when used from the PC running WAMPServer but it will only work from that 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: How to change URL?
Posted by: retherenn (---.vln.skynet.lt)
Date: September 23, 2016 08:17PM

I have tried this method before starting wampserver
ipconfig /flushdns
net stop dnscache
net start dnscache
But it still is not working... And yes, I am running it as administrator...

Options: ReplyQuote


Sorry, only registered users may post in this forum.