Virtual Hosts always going to /xampp

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Virtual Hosts always going to /xampp

Postby bsalman » 08. August 2013 14:41

Hello,

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!
bsalman
 
Posts: 1
Joined: 08. August 2013 14:22
XAMPP Version: 5.6.3
Operating System: OS 10.8.4

Re: Virtual Hosts always going to /xampp

Postby iggyvolz » 15. August 2013 21:54

Did you go into /htdocs and delete the index.php file? If not, try that and see if anything changes. It sounds to me like the virtual host isn't set up correctly and it is using the default /htdocs. (Sorry, but I don't know much about virtual hosts)
iggyvolz
 
Posts: 6
Joined: 10. August 2013 20:48
XAMPP Version: 5.6.3
Operating System: Mac OS X


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 2 guests