Installing drupal 7.5 with xampp

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Installing drupal 7.5 with xampp

Postby speller » 23. September 2016 06:33

I would like to install drupal 7.5 manually. I used xampp-win32-7.0.9-1-VC14-installer.exe; it's installed on a windows 10 hyperv vm. This is a domain; the host is windows 2012 r2.

I have installed drupal 7 many times on typical shared hosting scenarios. There via cpanel I'd create an add on domain, unzip the drupal files into that directory, create the database in mysql, and walk through the installer process.

I'm not sure how best to emulate that with xampp. I will want several sites at different addresses for testing purposes. I read about apache virtualhosts where I could edit httpd-vhosts to be like

<VirtualHost *:80>
DocumentRoot "c:/xampp/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "c:/xampp/htdocs8080"
ServerName d75.localhost
</VirtualHost>

But what I don't understand (without testing the above) is what to do with the files that are already present in the root of htdocs. There is an index.php but it has

<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/dashboard/');
exit;
?>
Something is wrong with the XAMPP installation :-(

which I don't understand...do I toss this file and install drupal into the root of htdocs just like I would in a shared hosting scenario?

And if I used a config like my virtualhosts example above, if I created a folder at c:/xampp/htdocs8080 with another drupal installation would it function?

Thanks
speller
 
Posts: 17
Joined: 09. November 2009 02:39

Re: Installing drupal 7.5 with xampp

Postby Nobbie » 23. September 2016 17:57

speller wrote:I'm not sure how best to emulate that with xampp. I will want several sites at different addresses for testing purposes. I read about apache virtualhosts where I could edit httpd-vhosts to be like

<VirtualHost *:80>
DocumentRoot "c:/xampp/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "c:/xampp/htdocs8080"
ServerName d75.localhost
</VirtualHost>


This is already a bad misunderstanding of VirtualHosts, you definately should not use different Ports in the VirtualHosts. The idea of (namebased) Virtualhosts is having different Servernames (i.e. Domainnames) for the same IP. The Port should be 80 in any case (as this is the standard Port for HTTP).

speller wrote:But what I don't understand (without testing the above) is what to do with the files that are already present in the root of htdocs.


Nothing. Simply leave them as they are, they are assigned to "localhost" and thats Ok. If you want run Drupal in another VirtualHost, create a VirtualHost for each Drupal Installation (usually only one VirtualHost, but if you are planning to run more than one Drupal, create more VirtualHosts).
Nobbie
 
Posts: 8770
Joined: 09. March 2008 13:04

Re: Installing drupal 7.5 with xampp

Postby speller » 23. September 2016 19:52

Yeah, I added that port stuff on my own initiate, for better or worse. So you suggest leaving the root htdocs folder content as is, and then creating whatever subdomains I need via virtualhosts just like the xampp doc lays out. Sounds good and thanks for the input.
speller
 
Posts: 17
Joined: 09. November 2009 02:39

Re: Installing drupal 7.5 with xampp

Postby speller » 24. September 2016 04:31

Here is the change I made to httpd-vhosts.conf

<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/xampp/apps/d75_01/htdocs"
ServerName d75-01.localhost
</VirtualHost>

Saved the file restarted apache, put a simple index.html file in there, opened inbound port 80. I can't connect using a url like http://d75-01.myserver, from the vm itself or form other machines on the lan. I can get to http://myserver

What have I done wrong?
speller
 
Posts: 17
Joined: 09. November 2009 02:39

Re: Installing drupal 7.5 with xampp

Postby Nobbie » 24. September 2016 11:00

speller wrote:What have I done wrong?


A lot.

1) There is no Servername d75-01.myserver in your declaration, only d75-01.localhost

2) What is "myserver"?

3) Did you assign a valid IP (i.e the IP of your Xampp Server) to d75-01.localhost? If yes, where and how did you do so? If there is no IP assigned to d75-01.localhost, how should the browser know, to which IP send the request?
Nobbie
 
Posts: 8770
Joined: 09. March 2008 13:04

Re: Installing drupal 7.5 with xampp

Postby speller » 24. September 2016 17:36

myserver was a stand in for the actual server name. I thought localhost would be ok inside the apache vhosts file, as my mods were based on the example supplied with xampp, but on the network (and locally on the vm with xampp) it'd be accessible via myserver. Is that wrong?

Re your #3, I didn't do anything like that. The network is able to find http://myserver which is the xampp page. I thought the idea of the vhosts file was to simply expand the basic port 80 destinations on this server to include additional subdomains? The xampp virtualhosts example does not talk about assigning an ip address to get this to work.

But I see I did misinterpret something in those instructions. It does say "Virtual hosts created in this manner will not be accessible from other systems, unless those systems are separately configured to associate the custom domain used by the virtual host with the IP address of the XAMPP server". I took that to mean outside the lan, but it probably does mean outside the vm I have this set up on. I do want it to be visible on the lan.

However I just tried http://d75-01.localhost/ on the vm that has xampp and it doesn't find anything.
speller
 
Posts: 17
Joined: 09. November 2009 02:39

Re: Installing drupal 7.5 with xampp

Postby speller » 27. September 2016 06:36

Still hoping for some input on this.
speller
 
Posts: 17
Joined: 09. November 2009 02:39

Re: Installing drupal 7.5 with xampp

Postby Nobbie » 27. September 2016 12:31

speller wrote:Still hoping for some input on this.


Maybe, but this forum is about technical problems about Xampp. You need some tutorials and documentation about TCPIP, about DNS, about HOSTS files and how domain names have to be declared and are resolved. This does not have anything to do with Xampp, it is definately outside of the scope of this forum. Of course i could write a long technical paper how to manage your own free domain names in your LAN, but this is by far too much work for me. I cannot teach you TCPIP and how it all works, you should look for tutorials.

You may start here http://superuser.com/questions/801411/h ... within-lan

If it is insufficient, use Google to find more documentation for that issue.
Nobbie
 
Posts: 8770
Joined: 09. March 2008 13:04

Re: Installing drupal 7.5 with xampp

Postby speller » 27. September 2016 17:39

There is certainly no need for you to contribute more to this thread and I appreciate the time you took. I am following the instructions included with xampp for virtual hosts, and either I made a mistake in following them, or the info is incomplete. I don't think this is an inappropriate venue. But I won't expect any additional help from this source unless someone else jumps in. IE I don't ping this thread again.
speller
 
Posts: 17
Joined: 09. November 2009 02:39

Re: Installing drupal 7.5 with xampp

Postby Nobbie » 27. September 2016 19:18

speller wrote: I am following the instructions included with xampp for virtual hosts, and either I made a mistake in following them, or the info is incomplete


Neither nor.

speller wrote:IE I don't ping this thread again.


Nice.
Nobbie
 
Posts: 8770
Joined: 09. March 2008 13:04

Re: Installing drupal 7.5 with xampp

Postby speller » 27. September 2016 20:42

I'd missed the hosts file instructions on the xampp page and now it works. I know about hosts files, from ages ago, but hadn't realized that this was a situation that needed this. Sloppy instruction following on my part.

I do get an 403 access forbidden error, but I'll sort that out.
speller
 
Posts: 17
Joined: 09. November 2009 02:39

Re: Installing drupal 7.5 with xampp

Postby Nobbie » 28. September 2016 12:16

speller wrote:I'd missed the hosts file instructions on the xampp page and now it works. I know about hosts files, from ages ago, but hadn't realized that this was a situation that needed this. Sloppy instruction following on my part.


I'd missed a hint that the PC has to be switched on. Sloppy instruction.

Even more: the hosts file is only ONE of many different solutions (and is usefull in "small" LANs only). A DNS server is a sophisticated solution, also some routers can resolve domain names - everything depends on your personal environment. Do you really believe that Xampp (a webserver package) should explain the whole idea of domain names and IPs, including all existing solutions?
Nobbie
 
Posts: 8770
Joined: 09. March 2008 13:04

Re: Installing drupal 7.5 with xampp

Postby speller » 28. September 2016 15:07

"sloppy instruction following on my part" means I was sloppy in following the instructions, obviously.
speller
 
Posts: 17
Joined: 09. November 2009 02:39

Re: Installing drupal 7.5 with xampp

Postby Nobbie » 28. September 2016 15:42

speller wrote:I do get an 403 access forbidden error, but I'll sort that out.


Probably due to a missing appropriate "Require" clause in VirtualHost (i.e. "Require all granted"). "Require ..." replaces the deprecated "Allow From ...." clause since Apache 2.4

https://httpd.apache.org/docs/2.4/howto/access.html
https://httpd.apache.org/docs/2.4/upgrading.html
Nobbie
 
Posts: 8770
Joined: 09. March 2008 13:04

Re: Installing drupal 7.5 with xampp

Postby speller » 28. September 2016 16:29

Very good, that tip got it straightened out. Now the httpd-vhosts.conf contains

<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/xampp/apps/d75_01/"
ServerName d75-01.localhost
ErrorLog "logs/d75_01.local-error.log"
CustomLog "logs/d75_01.local-access.log" combined
<Directory "C:/xampp/apps/d75_01/">
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

Much appreciated. Possibly worth altering the xampp docs on virtualhosts to include the Require All Granted for this version of apache.
speller
 
Posts: 17
Joined: 09. November 2009 02:39

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: DrSeussFreak and 65 guests