Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

apache server setup

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

apache server setup

Postby DigitalRice » Wed Jul 16, 2003 8:58 pm

hello experts,
i'm develope my website at home running under apache server 4.xx, and the default url address is http://localhost
is there anyway to set it to my url address: http://www.mypaidurl.com
and still running locally like http://localhost ? i meant it should act exactly like http://localhost without giving me the microsoft error message that trying to connect to the real dns server on the internet.

thanks
DigitalRice
New php-forum User
New php-forum User
 
Posts: 29
Joined: Fri Jun 27, 2003 10:05 pm

Postby toweter » Sat Aug 30, 2003 9:14 am

no, that's not possible...
you can change in the httpd.conf
the line "ServerName localhost" for example to www,
then you can reach your page (with a subdirectory) at http://www/mypaidurl ...;)
toweter
New php-forum User
New php-forum User
 
Posts: 26
Joined: Sat Aug 30, 2003 9:04 am

Re: apache server setup

Postby swirlee » Sun Aug 31, 2003 11:11 am

DigitalRice wrote:i'm develope my website at home running under apache server 4.xx, and the default url address is http://localhost
is there anyway to set it to my url address: http://www.mypaidurl.com
and still running locally like http://localhost ?


So you want to be able to type http://www.mypaidurl.com in your browser, but have it resolve to localhost? In windows you can do this in your hosts file. Open the file "hosts" in your windows directory. Now add to the file a line like this:

Code: Select all
127.0.0.1       www.mypaidurl.com


127.0.0.1 is an alias for localhost. This just tells your computer to redirect all requests for the address on the right to the address on the left.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

URL name

Postby ruturajv » Sun Aug 31, 2003 9:23 pm

If you want to do this you first add the ServerAlias directive for the virtual host and then go to the Internet OPtions >Connections > LAN Settings and say I'm behind proxy 127.0.0.1

Once you do that apache which is confd. for 127.0.0.1 will serve you for your serveralias name.

But has a down fall to access to net, you have to remove 'I am behind the proxy setting'
User avatar
ruturajv
php-forum Super User
php-forum Super User
 
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 8 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.