I recently had to rebuild my computer, and I've run in to some issues with virtual hosts that used to work before my machine was rebuilt, but now whenever I try to access any of the local sites, it automatically adds on a /xampp at the end, and brings me to the 'Welcome to XAMPP for OS X 1.8.2-1' page with things like phpMyAdmin on the side bar.
I've looked in my hosts file, made sure Virtual Hosts are on in httpd.conf, and then made sure all of the information in the httpd-vhosts.conf files are correct, and I can't tell any difference. This is both for the conf files in my /private/etc section as well as from within my /Applications/XAMPP/xamppfiles/etc/ folders. I'm totally stuck, and am hoping someone can help out.
Here's what my hosts file looks like (computer name, some IP addresses, and site name changed for security reasons)
- Code: Select all
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
1.2.3.4 qa.site1.com
1.2.3.4 qa.site1.ca
127.0.0.1 local.site2.com
127.0.0.1 local-m.site2.com
127.0.0.1 local.site2.ca
127.0.0.1 local-m.site2.ca
#Added by XAMPP Control
#127.0.0.1 myComputer
#Added by XAMPP Control
127.0.0.1 myComputer
and here is the entries into my httpd-vhosts.conf file from within XAMPP:
- Code: Select all
<VirtualHost *:80>
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/site2/public/"
ServerName local.site2.com
ServerAlias local.site2.ca
ServerAlias local-m.site2.ca
ErrorLog logs/local.site2.com-error_log
CustomLog logs/local.site2.com-access_log common
RewriteLog logs/local.site2.com-rewrite_log
SetEnv SERVER_ENV 'local'
SetEnv DB_NAME 'wp_site2'
SetEnv DB_NAME_LOCATIONS 's2_locations'
SetEnv DB_USER 'root'
SetEnv DB_PASSWORD ''
SetEnv DB_HOST '127.0.0.1'
SetEnv DOMAIN_CURRENT_SITE 'local.site2.com'
# Several Wordpress files use short open tags
php_value short_open_tag 1
# |------ Edit this -------|
<Directory "/Applications/XAMPP/xamppfiles/htdocs/site2/public/">
Options FollowSymLinks Indexes
AllowOverride Fileinfo Options
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
# Mobile Site
<VirtualHost *:80>
# |------ Edit this -------|
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/site2/public-mobile/"
ServerName local-m.site2.com
ServerAlias local-m.site2.com
ErrorLog logs/local-m.site2.com-error_log
CustomLog logs/local-m.site2.com-access_log common
RewriteLog logs/local-m.site2.com-rewrite_log
SetEnv SERVER_ENV 'local'
SetEnv DB_NAME 'wp_site2'
SetEnv DB_NAME_LOCATIONS 's2_locations'
SetEnv DB_USER 'root'
SetEnv DB_PASSWORD ''
SetEnv DB_HOST 'dbserver'
SetEnv DOMAIN_CURRENT_SITE 'local-m.site2.com'
# |------ Edit this -------|
<Directory /Applications/XAMPP/xamppfiles/htdocs/site2/public-mobile/>
Options FollowSymLinks Indexes
AllowOverride Fileinfo Options
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
I'm lost as to why this isn't working, but if anyone can offer any help, I'd really appreciate it!