@caltuna
I'm using a similar strategy to install a new XAMPP version.
Since a few weeks I place my website-docs into a different location (the root of my Macintosh HD), so the basepath of my website-docs is now /Websites/ instead of /Applications/XAMPP/xamppfiles/htdocs/. Only the XAMPP-pages will stay in the htdocs folder.
To access the websites on the new location I made a virtual host.
As for the SQL-dump of the MySQL-database, since I'm using XAMPP on different locations, I frequently make SQL-dumps for each website. I place these SQL-files in one of the folders of my websitefolder. I only need to make new SQL-files if I made some changes in the database and when I'm taking my files of the website to a different location.
This is how a website-folder of my usually looks like:
- class/
php-classes.
- docs/
documentation and thoughts.
- includes/
configuration and third-party classes.
- log/
- pages/
a folder for Smarty, which includes a cache-folder, a config-folder, a templates-folder and a templates-compiled-folder.
- public_html/
this folder contains all files that may be accessed in the browser, it contains folders 'images', 'js', and 'css', a .htaccess-file and an index.php-file.
sql/
all sql-files to build up the database.
tmp/
temporary files, used for the webserver to store uploads temporary (this is done by my Uploader-class).
Making a virtual host1. Edit the file '/Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf' to add virtual hosts. I'm using an other port for each virtual host.
- Code: Select all
Listen 1000
NameVirtualHost *:1000
<VirtualHost *:1000>
DocumentRoot "/Websites"
<Directory />
Options Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
2. Edit '/Applications/XAMPP/xamppfiles/etc/httpd.conf' and uncomment this line:
- Code: Select all
Include /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf
You can find this line near the end of the document.
3. If you are using XAMPP for Mac v1.0.1 or XAMPP for Mac v1.7.2a then you need to add the following line as well in order to work with multiple ports:
- Code: Select all
AcceptMutex flock
Now the docs inside /Websites/ can be accessed in the browser this way:
http://127.0.0.1:1000/