Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Change default address from http://localhost |
|
Author |
|
duck__boy
Joined: 16 Feb 2010 Posts: 1 Location: Somerset, UK
|
Posted: Tue 16 Feb '10 12:26 Post subject: Change default address from http://localhost |
|
|
Hey all,
I am brand spanking new to Apache and web hosting, so please excuse the noobness of my question...
I only intend to use Apache to host internal websites (Intranet, for example), and although it is only the one at the moment, that is held at http://localhost, that will be no good soon.
Could somebody please help me to
1 - Change the domain name of a site (so that it becomes http://intranet, for example)
2 - Add a second site, so that I can also have a development environment for our companies website.
Any help is greatly appriciated.
Thanks. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7306 Location: Germany, Next to Hamburg
|
Posted: Tue 16 Feb '10 13:37 Post subject: |
|
|
create vhosts[1]
Code: |
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot C:/www/intranet
ServerName intranet
ErrorLog C:/logs/intranet.error.log
CustomLog c:/logs/intranet.access.log common
<Directory "C:/www/intranet">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot C:/www/development
ServerName development
ErrorLog C:/logs/development.error.log
CustomLog c:/logs/development.access.log common
<Directory "C:/www/development">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
|
if it is only on your computer you can use the hosts file[2].
to your hosts file add
Code: |
127.0.0.1 intranet
127.0.0.1 development
|
if it shall reachable from the entire network with that names you have to ask your administrator to configure the DNS server for that.
[1]http://httpd.apache.org/docs/2.2/vhosts/name-based.html
[2]%windir%\system32\drivers\etc\hosts |
|
Back to top |
|
rlbruderick
Joined: 27 Feb 2010 Posts: 3
|
Posted: Sat 27 Feb '10 22:53 Post subject: PHP install causes Broken Link of http://localhost |
|
|
Hi. I'm new to LAMP, but I've got an installation working on my desktop.
I've spent a whole day trying to do the same thing on my Windows XP Pro sp3 (same as desktop) laptop, but I'm stuck.
After installing Apache 2.2, the http://localhost gives me "It Worked".
After installing PHP 5.3, with a lot of tweeking, http://localhost gives me "Broken Link".
PHP seems to be working on its own. But the Apache Service Monitor gives me "Requested Operation has Failed" if I try to Start a service.
Why is this so complicated? What am I missing now?
Any help would be awesome. Thanks. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Sun 28 Feb '10 0:03 Post subject: |
|
|
What's in error log? If nothing there what is in the Event Viewer
Are you loading the proper PHP module (php5apache2_2.dll)? |
|
Back to top |
|
rlbruderick
Joined: 27 Feb 2010 Posts: 3
|
Posted: Sun 28 Feb '10 1:23 Post subject: |
|
|
Thanks very much for the quick reply.
Here's the error log:
(deleted, see next post)
I don't understand the problem with the Fully Qualified Server Name. I'm just trying to use localhost.
This is in my httpd-vhosts file:
<virtualhost *:80>
ServerAdmin admin@localhost.com
DocumentRoot "C:/webServer/www/myserver.dev/public_html"
ServerName myserver.dev
ServerAlias www.myserver.dev
<directory "C:/webServer/www/myserver.dev/public_html">
AllowOverride All
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</directory>
</virtualhost>
The PHP download I used didn't include that php5apache2_2.dll, so I found it and several other missing DLLs somewhere else.
Last edited by rlbruderick on Sun 28 Feb '10 1:46; edited 1 time in total |
|
Back to top |
|
rlbruderick
Joined: 27 Feb 2010 Posts: 3
|
Posted: Sun 28 Feb '10 1:39 Post subject: |
|
|
Wait a sec.
I gave you an old error! Doh! Sorry to waste your time.
Here's the latest one:
The Apache2.2 service is restarting.
Starting the Apache2.2 service
The Apache2.2 service is running.
(OS 3)The system cannot find the path specified. : could not create C:/webserver/logs/httpd.pid
[Sun Feb 28 06:15:25 2010] [error] httpd.exe: could not log pid to file C:/webserver/logs/httpd.pid
[Sun Feb 28 06:18:04 2010] [error] (OS 3)The system cannot find the path specified. : could not create C:/webserver/logs/httpd.pid
[Sun Feb 28 06:18:04 2010] [error] httpd.exe: could not log pid to file C:/webserver/logs/httpd.pid
There is a problem with the directory. Should be:
C:/webserver/apache/logs/httpd.pid
I can't find where to edit that in the conf/httpd.conf document file.
OK! FIXED!
I just moved the logs directory down to webserver. |
|
Back to top |
|
|
|
|
|
|