Shut down your virtual machine, then in VirtualBox select your virtual machine and open up the settings. Setting Up Shared Folders From The Windows Host Remember to create a virtual configuration file for each website you want on the server, then you can use a2ensite and a2dissite to switch between websites. Restart Apache to apply the new settings: If you need modrewrite to be enabled enter the following (otherwise you will see server errors): Then you need to disable the default site: Save and close your new configuration file. htaccess file with your website you need to change the AllowOverride None on the Directory /var/www/newsite to: In between the ServerAdmin and DocumentRoot lines define a ServerName for your new site, also change the DocumentRoot to match the folder for the site: Options Indexes MultiViews FollowSymLinks # Possible values include: debug, info, notice, warn, error, crit,ĬustomLog /var/log/apache2/access.log combined Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Options Indexes FollowSymLinks MultiViews Sudo gedit /etc/apache2/sites-available/newsite Sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/newsite Copy the default configuration file and edit it for your new website as outlined in the Ubuntu server guide: You should create a folder for each of your websites using the Terminal like so:įor each website you then need to set up a virtual host configuration file. The default location for your websites on the Apache server is in /var/www/. This will allow you to work on your files and view them in your preferred browser on your host machine before uploading them to your live server. This short guide will show you how to set up multiple websites to run from your development server and have the websites shared from your Windows host machine. If you havent already set up your virtual machine, you may want to check out our guide on setting up an Ubuntu LAMP server running on VirtualBox.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
February 2023
Categories |