What is Alias
Posted by: jemz (---.210.4.202.pldt.net)
Date: May 06, 2013 05:34PM

Hi, please enlighten my mind,what is Alias directories in aptache?...how to make alias directories and how to use this....sorry if i asked this kind of question..i am new in this Alias.



Thank you

Options: ReplyQuote
Re: What is Alias
Posted by: stevenmartin99 (Moderator)
Date: May 06, 2013 06:39PM

an alias in this sense of the meaning is very llke using mod rewrite to change urls

if you have a folder

c:\website

and you want it to be accessible in wamp using localhost\site1 you can use an alias to do this.

it basically maps a path to a url. PHPMYADMIN that comes with wamp is set up as an alias. the url localhost/phpmyadmin actually points to a folder c:\wamp\apps\phpmyadmin while the document root for wamp is still c:|wamp\www


its similar to vhosts but has less control than a vhost because it must form part of the document root url and not its own url

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: What is Alias
Posted by: jemz (---.210.4.202.pldt.net)
Date: May 06, 2013 06:47PM

HI, thank you for the reply...Can you please provide me some steps on how to create the alias directories and to access this.

Thank you in advance.

Options: ReplyQuote
Re: What is Alias
Posted by: stevenmartin99 (Moderator)
Date: May 06, 2013 06:57PM

If you open the folder c:/wamp/alias you will see three aliases set up already. Copy one of these files and rename it to anything you'd like.
Edit the file, there are 3 settings in the file. The first is the url, the second is the folder path, and the third is the access setting.
Below is a sample as you can see

Alias /URL "c:/PATH/TO/FOLDER/" 

#
#
#        Order Deny,Allow
#	Deny from all
#	Allow from 127.0.0.1
#
# by
#
#        Order Allow,Deny 
#   Allow from all
#

<Directory "c:/PATH/TO/FOLDER/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order Deny,Allow
	Deny from all
	Allow from 127.0.0.1
</Directory>

This is valid for apache<=2.2
if you're using Apache 2.4 you will notice that the access settings have changed to using the command "require" so you must use that.

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: What is Alias
Posted by: jemz (---.210.4.202.pldt.net)
Date: May 06, 2013 07:11PM

Hi, Thank you for the quick reply,,okay i will try this,one more thing is possible to use public Ip Address for this,example i am going to type in the url: [mypublicip] ....is this possible ?

Options: ReplyQuote
Re: What is Alias
Posted by: jemz (---.210.4.202.pldt.net)
Date: May 06, 2013 07:43PM

Hi, Thank you i got it now,but is it possible to access in public ip? like this [mypublic] IP/testweb

Thank you smiling smiley



Edited 1 time(s). Last edit at 05/06/2013 08:29PM by jemz.

Options: ReplyQuote
Re: What is Alias
Posted by: jemz (---.210.4.202.pldt.net)
Date: May 06, 2013 08:36PM

Hi, why is it if i will use the public ip address in the url,it will prompt "Authentication Required" Admin and password ?...by the way i have no access in the router i am just using the wifi from my Uncle..and i have no idea for the router.


THank you smiling smiley

Options: ReplyQuote
Re: What is Alias
Posted by: stevenmartin99 (Moderator)
Date: May 06, 2013 08:42PM

the security for alias is set to local pc only

its written in the alias file , and explanis how to make available for everyone

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: What is Alias
Posted by: jemz (---.210.58.208.pldt.net)
Date: May 08, 2013 06:58PM

stevenmartin99 Wrote:
-------------------------------------------------------
> the security for alias is set to local pc only
>
> its written in the alias file , and explanis how
> to make available for everyone


Hi, Yes this what i did


Alias /webdev/ "c:/devfolder/"

<Directory "C:/devfolder">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from all
</Directory>

but if i am going to type my public ip in the url example:
http://mypublicip:80/webdev

it will ask authentication...but i don't know the usernam and password for the admin of router.

Thank you smiling smiley



Edited 2 time(s). Last edit at 05/08/2013 07:00PM by jemz.

Options: ReplyQuote
Re: What is Alias
Posted by: RiggsFolly (---.as13285.net)
Date: May 20, 2013 11:52AM

You cannot use you PublicIP like that from inside your own network. Most routers dont allow it as they dont have loopback mode available. You can only do that from outside on the internet.

From inside your network, use 'localhost'

Also as you have put your site outside the normal c:\wamp\www\project1 type folder structure Apache will not have access to it unless you create a Virtual Host.

Do a search here for 'Virtual Host' and you should find a HowTO tutorial.

Options: ReplyQuote


Sorry, only registered users may post in this forum.