Xampp keeps redirecting to dashboard - apache

I am trying to set up local dev environment with virtual host, using XAMPP, on my new work laptop - running Windows 10.
I have exactly the same set up as on my Surface Pro where it works, but each time I try to access local, I get redirected to the dashboard.
In the hosts file I have added:
127.0.0.1 local.testing.co.uk
In httpd-vhosts.conf I have added:
<VirtualHost *:80>
DocumentRoot "C:/www/testing-co-uk/web"
ServerName local.testing.co.uk
<Directory />
AllowOverride none
Require all granted
</Directory>
</VirtualHost>
In httpd.conf, I have amended the DocumentRoot and Directory as follows:
DocumentRoot "C:/www"
<Directory "C:/www">
My testing-co-uk folder is in C:/www
If I go to local.testing.co.uk, I get redirected to local.testing.co.uk/dashboard.
If I go to localhost, I also get redirected to local.testing.co.uk/dashboard.
If I go to localhost/index.php, I do get to the front page of site I want, however clicking on a link will take me to local.testing.co.uk/linkname (and a 404 error).
Can anyone kindly suggest what could be going wrong? I have been going slowly insane for about 10 hours now. I have checked various other posts within Stack Overflow and tried various solutions, and of course, restarted Xampp every time.
Any help would be really appreciated.
Kind regards
James

Related

apache xampp virtual host makes error 403 windows

I simply want to enable the test.php file to be accessible via a virtualhost so I added just 127.0.0.1 test.localhost in the windows host file and
<VirtualHost *:80>
DocumentRoot "D:/Programmordner/test"
ServerName test.localhost
<Directory "D:/Programmordner/test">
require all granted
#<FilesMatch "^((test|test2).testdateiendung1|.+.testdateiendung2)$">
<FilesMatch "^(test.php)$">
Allow from All
</FilesMatch>
in httpd-vhosts.conf
Now if I add the second, it seems I even cannot open the default documentation website by clicking the admin-button on the apache interface, which should not be affected? If I erase the second the alterations in the windows host file doesnt affect anything and I can access all files in standard htdocs. I switched different versions like allow from all, access denied access granted but nothing changed
If somebody knows there is already which solves my problem, I will not grudge him however I looked for it and it did not help
I made several fixes and changed to Port 80 (without httpS :( ) and everything is running now.

WAMP 3.1 setup on Windows 10. Can't access online

I've been trying two days straight to make this work. I want to make my server available online so I can work with another guy on this project. The goal is mainly to have two things:
The www website available through my public ip
MySQL available to him so he can work
This computer has:
Windows 10 Pro
WAMP 3.1
Node.JS
I went through the configuration of the vhost of wamp, port forwarding in my router and this doesn't work:
# Virtual Hosts
#
<VirtualHost *:80>
ServerName 192.168.2.51
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I put back what was in http.conf because that's the first thing I modified at first until I discover the new WAMP wasn't using this anymore.
I though Node.JS could conflict so I shut it down. I also shut most process using port 80 but still no luck.
I used an online port checker. The result is positive and it seems to go through, at least from their POV. And I did a netstat to check if I had 0.0.0.0:80 so everything seems fine on that side.
The port 80 tester of WAMP even says it's fine so I'm guessing it must be in the Virtual host but I have no idea how to set it up properly and documentation is not helping a lot.
What am I missing?
regards,

Apache VirtualHost Loading the Wrong Page

Problems
An Apache VirtualHost keeps loading the wrong directory when I'm telling it to load a completely different part. Here is what I have for the VirtualHost:
<VirtualHost *:80>
DocumentRoot "/Workspace/Font"
ServerName fonts.wrks.tk
# ErrorLog "/Logs/Workarea/Fonts/Error.log"
# CustomLog "/Logs/Workarea/Fonts/Access.log" common
<Directory "/Workspace/Font">
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
So, the problem, I'm telling it to load /Workspace/Font But it's not, it's loading /Workspace instead. I'm not sure how this came to be.
Attempt at Solution
There's not much I could do considering that the search on Google gave me no relevant results on what I was trying to fix. But regardless, here is some things I did myself to try and fix it.
Restarted Apache Multiple times
Changed permissions around:
sudo chown -R daemon:daemon /Workspace/Fonts (I run XAMPP, and the user and group is daemon)
Checked Error Logs (Nothing Relevant to the problem was printed)
Created a index folder and/or tried to access folder and files within the domain.
It turns out I didn't have the VirtualHosts line uncommented, thanks for anyone that helped in the past. But everything works now.

Apache Dynamic Virtual Hosts - 403 Forbidden

I am trying to configure the Apache server on my MacBooks (running Lion OS) to handle dynamic virtual hosts. I have managed to get it "working" but I whenever I access the domain I get a 403 Forbidden message. The hosts file is configured to point to 127.0.0.1 whenever one of these domains are requested. The httpd.conf is shown below:
VirtualDocumentRoot "/web"
<Directory "/web">
Options All
AllowOverride All
Order allow,deny
Allow from all
ScriptAlias /web/cgi-bin/
</Directory>
UseCanonicalName Off
VirtualDocumentRoot /web/%2/%1/public_html
This is set up so that http://foo.bar/ goes to "/web/bar/foo/public_html/".
I have checked the permissions on all the directories and files and they are all set to '777'. I have Googled for hours and hours and I am still getting 403 Forbidden. If there is anyone that can help me that would be greatly appreciated.
-Sam
You got it right, it's about permission. Check your site's parent folder permission, it might be stuck somehow on one of it's parent folder, make sure all of you site's parent folder from the root are readable by apache.

Magento not accessible since tried to move to multi website setup. Apache issue?

I wish I had never seen this article:
http://www.magentocommerce.com/knowledge-base/entry/tutorial-multi-site-multi-domain-setup
I have Apache 2.2 installed on my XP machine and until a while ago I had a Magento site that I could test the development of a custom module on. I decided that I wanted to have multiple websites and multiple stores so that I could test that my modules configuration variables set at the different scopes (global, website, and store) were working as expected.
So I followed the instructions in the above Magento article. I created a website and gave it a name of “paulsplace.com”. I created a couple of Stores under that website. I then went to System/Configuration/General/Web and, with the scope set to paulsplace.com, I set the unsecured and secured URLs to http://paulsplace.com/ and https://paulsplace.com/ and hit Save Config - what a mistake!!
I got a 404 error. And now I can’t get to my magento front end or back end.
I tried a couple of things:
I added these lines to my hosts lookup file:
127.0.0.1 paulsplace.com
127.0.0.1 www.paulsplace.com
I then uncommented this line in my httpd,conf file:
Include conf/extra/httpd-hosts.conf
and added the following to the conf/extra/httpd-hosts.conf file:
<VirtualHost *:80>
ServerAdmin me#myemail.com
DocumentRoot "C:/Applications/Apache Software Foundation/Apache2.2/htdocs"
ServerName paulsplace.com
ErrorLog "logs/paulsplace.com-error.log"
CustomLog "logs/paulsplace.com-access.log" common
</VirtualHost>
and restarted Apache.
If I browse to “http://www.paulsplace.com” I now get a page that just says “It works!”. Same for “http://paulsplace.com” and “http://www.paulsplace.com/magento/index.php”.
I tried a few more things - I added this line to httpd.conf:
AccessFileName htaccess
(I did this because Windows Explorer didn’t let me create a file starting with a dot; I could do it from the command prompt, but I believe what I have done should be ok).
I changed AllowOverride to All from None:
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
</Directory>
<Directory "C:/Applications/Apache Software Foundation/Apache2.2/htdocs">
AllowOverride All
</Directory>
and in C:\Applications\Apache Software Foundation\Apache2.2\htdocs\htaccess (a file that I created), I entered:
SetEnvIf Host www\.paulsplace\.com MAGE_RUN_CODE=pws1
SetEnvIf Host www\.paulsplace\.com MAGE_RUN_TYPE=website
SetEnvIf Host ^paulsplace\.com MAGE_RUN_CODE=pws1
SetEnvIf Host ^paulsplace\.com MAGE_RUN_TYPE=website
(pws was the value I used for the “Code” when creating my store).
Please tell me how I can put this right. I feel like I’m taking one step forward and three backward at the moment.
Any help really would be greatly appreciated.
<VirtualHost *:80>
ServerAdmin me#myemail.com
DocumentRoot "Change this to point at your magento install"
ServerName paulsplace.com
ErrorLog "logs/paulsplace.com-error.log"
CustomLog "logs/paulsplace.com-access.log" common
SetEnv MAGE_RUN_TYPE website
SetEnv MAGE_RUN_CODE pws1
</VirtualHost>
If changing anything in System Configuration borks your system, you can always clear out the bad values in the database directly, and clear your Magento cache. Do a
select * from core_config_data where value LIKE '%paulsplace.com%'
This will give you the two rows that were added when you clicked save. Remove the rows. Next, clear out all the files in
var/cache/*
to clear your cache. Then restore your Apache config to what it was before you started monkeying around. This should restore your site back to its previous state, and you can continue to experiment with things.