Create Apache virtual hostsĮdit the vhosts sub-configuration file as root by typing this into your terminal: # Edit the XAMPP Apache virtual hosts configuration file as root Save those changes and close the text editor to return to the terminal window. Sudo gnome-text-editor /opt/lampp/etc/nfĮnable Virtual Hosts: Enable the “virtual hosts” sub-configuration file by removing the “#” at the beginning of that line: Enable Apache’s vhosts sub-configuration file # Edit the XAMPP main Apache configuraiton Paste the following into a terminal window to edit the core configuration as root. XAMPP’s Apache configuration has a core configuration file, and several sub-configuration files. Press CTRL C to stop the ping command from running. You should see a response that confirms a response from “127.0.0.1”, like this: 64 bytes from localhost (127.0.0.1): icmp_seq=7 ttl=64 time=0.043 msĦ4 bytes from localhost (127.0.0.1): icmp_seq=7 ttl=64 time=0.043 ms Save that, close the editor, go back to your terminal and test that it works: # Check that hostname lookups are working You can change the host names to suit your projects, and you can add as many as you like: # Type the following into a terminal to edit your system’s “hosts” file: # Edit the system's hosts fileĪdd the following lines to the end of the file. This means we can add custom lookups in here for our development projects. When your computer tries to convert a host name into an IP address, it first checks a local file called “/etc/hosts” (before trying DNS). You can launch XAMPP on Ubuntu using a Desktop Launcher Configure host name lookups Log out of your desktop session, then log in again so “sktop” is picked-up by Gnome and added to the menus. InformationNotice that the command to run the XAMPP Control Panel is defined by the “Exec” line, and we prefix it with “sudo” so the program runs as root. Then add the following text, save the changes then close the text editor: Ĭomment=Use the XAMPP Control Panel to start/stop Apache & MySQL servicesĮxec=sudo /opt/lampp/manager-linux-圆4.run Sudo gnome-text-editor /usr/share/applications/sktop Paste the following into your terminal window and press Enter # Create an application launcher for XAMPP A desktop launcher is just a small text file that tells Gnome how to start XAMPP. To tidy things up, we’ll create a desktop launcher so you can pin it to the Dash. Exit the installer to go back to the terminal window. When it’s finished installing, uncheck the option to “Launch XAMPP” – we don’t want to run it yet. InformationAlthough the application is called the XAMPP Control Panel, it installs to a folder called “/opt/lampp” for historic reasons. The installation wizard doesn’t have much in the way of choice, so accept the defaults and finish the wizard to install it to “/opt/lampp/”. …and then run the installer file as root by using “sudo”, like this: # Run the downloaded file as root to start the installation Open a terminal and type the following so we can execute the installer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |