Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Trouble creating virtual host

Explorer ,
Dec 22, 2008 Dec 22, 2008
Hello,

I just purchased David Powers' books, Essential Guide to DW CS3 and PHP Object-Oriented Solutions and am anxiously awaiting their arrival. In the meantime, I installed xampp's version of Apache, PHP, MySQL, etc. That install went fine and after some playing around I was able to view the localhost files that came with it. Now I am on to get a virtual host setup so that I can do my testing off-line. I followed the tutorial on David's site, but my files do not load in the browser (Firefox) window. If I type http://TSDevelopment or http://TSDevelopment/Home.php the browser forwards me to http://tsdevelopment/xampp and I see the same screen as if I went to http://localhost, namely xampp's welcome screen.

I have gone over the David's tutorial twice and can't see that I am missing anything, but I must have (?).

I am running on an XP Professional system.

Any help will be greatly appreciated.

Cheers and Merry Christmas,
Mike
TOPICS
Server side applications
774
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 22, 2008 Dec 22, 2008
You don't *really* need virtual hosts to test many pages. Virtual hosts are
necessary, though, if you are using root relative links.

So - when you browse to http://localhost, you see the XAMPP screen? That's
good.

What have you done so far to get your virtual hosts setup?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Mike-H" <webforumsuser@macromedia.com> wrote in message
news:gioo45$cm5$1@forums.macromedia.com...
> Hello,
>
> I just purchased David Powers' books, Essential Guide to DW CS3 and PHP
> Object-Oriented Solutions and am anxiously awaiting their arrival. In the
> meantime, I installed xampp's version of Apache, PHP, MySQL, etc. That
> install
> went fine and after some playing around I was able to view the localhost
> files
> that came with it. Now I am on to get a virtual host setup so that I can
> do my
> testing off-line. I followed the tutorial on David's site, but my files do
> not
> load in the browser (Firefox) window. If I type http://TSDevelopment or
> http://TSDevelopment/Home.php the browser forwards me to
> http://tsdevelopment/xampp and I see the same screen as if I went to
> http://localhost, namely xampp's welcome screen.
>
> I have gone over the David's tutorial twice and can't see that I am
> missing
> anything, but I must have (?).
>
> I am running on an XP Professional system.
>
> Any help will be greatly appreciated.
>
> Cheers and Merry Christmas,
> Mike
>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 23, 2008 Dec 23, 2008
Hi Murray,
Thanks for the reply. I know I probably don't need virtual hosts, but I really do want to make sure the paths work out. I would like that extra mental assurance that I have done everything I can to make the site as standalone as possible before uploading to a live site.

I am on a windows XP Pro machine. My virtual hosts will reside on my L: drive, which is a networked drive. I tried to follow David's tutorial (at http://www.foundationphp.com/tutorials/apache22_vhosts.php) on setting up the virtual hosts. Here is what I did:
1. Edited c:\windows\system32\drivers\etc\hosts and added the following line:
127.0.0.1 TSDev
2. Edited c:\xampp\apache\conf\httpd.conf and made sure that this line is NOT commented out:
Include conf/extra/httpd-xampp.conf
This is in the #Supplemental configuration section, under #XAMPP specific settings. This line was not commented out to begin with, so I did not change this file.
3. Edited c:\xampp\apache\conf\extra\httpd-vhosts.conf
A:) Added this section:
<Directory L:/WebDev>
Order Deny,Allow
Allow from all
</Directory>
B:) Added this section at the bottom:
<VirtualHost *:80>
DocumentRoot l:/WebDev/TSDev
ServerName TSDev
</VirtualHost>

I saved everything and rebooted. Then I got the results listed in my previous post.

I just looked at the Services snap-in, it shows that Apache2.2 is running, mysql is running and also another service called IIS Admin is running, I don't know if that would cause a conflict or not.

Thanks again for your help.
Mike
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 23, 2008 Dec 23, 2008
Mike-H wrote:
> I just looked at the Services snap-in, it shows that Apache2.2 is running,
> mysql is running and also another service called IIS Admin is running, I don't
> know if that would cause a conflict or not.

If they're both running on Port 80, that will definitely cause a conflict.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS4",
"PHP Solutions" & "PHP Object-Oriented Solutions"
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 23, 2008 Dec 23, 2008
David,

Thanks for your help. Is it better to stop IIS or change the port for Apache? If I change the port for Apache, what else do I need to change? No sites have been set up in IIS on this computer, so I don't know how IIS could have hijacked those calls and I suspect that they were handled by Apache.

Appreciate your help.

Cheers,
Mike
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 23, 2008 Dec 23, 2008
Just for fun, I decided to stop IIS. This did not solve the problem. There does not appear (to me at least) to be a conflict. In my browser, if I type in the address of http://TSDev/Home.php I get a 404 - Object not found. If I type http:// TSDev or http://TSDev/ I am forwarded to http://tsdev/xampp/ . Any ideas?

Thanks,
Mike
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 23, 2008 Dec 23, 2008
Mike-H wrote:
> In my browser, if I type in the
> address of http://TSDev/Home.php I get a 404 - Object not found. If I type
> http:// TSDev or http://TSDev/ I am forwarded to http://tsdev/xampp/ . Any
> ideas?

I have never set up virtual hosts in XAMPP, but it should be the same as
with a standard Apache installation. Make sure you still have a
definition in your virtual hosts file for localhost.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS4",
"PHP Solutions" & "PHP Object-Oriented Solutions"
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 27, 2008 Dec 27, 2008
LATEST
Hello again,

Hope everyone had a merry Christ-mas.

My books came (a day early - thank you, Amazon and UPS). I opened up to chapter 3 of David's Essential Guide. Since he had pretty thorough instructions, I decided to abandon the all-in-one approach to loading Apache,PHP and MySQL, so I uninstalled xampp and installed Apache and PHP individually. This went fine (I haven't attempted MySQL yet, that will be forthcoming), and I was able to get virtual hosts to work.

Sort of.

I discovered that as long as my virtual host directory is on my local c: drive the virtual host works great. If I put the same file in a network drive and change httpd-vhosts.conf to point to the network drive, then Apache won't load, either when I boot my computer, or if I manually stop and restart it. Has anyone had any experience with this? I am running XP Pro on my laptop (the Apache host). The network drives are on a server (running MS Server 2008, I think) in another part of the building. The IIS service has been stopped to avoid conflicts.

Thanks again in advance.

Mike
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines