install_apache_mysql_php_linux_ubuntu_server
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
install_apache_mysql_php_linux_ubuntu_server [2020/06/07 19:39] – wikiadmin | install_apache_mysql_php_linux_ubuntu_server [2020/06/08 03:54] – [Installing PHP] wikiadmin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Installing Apache2 web server, | + | ====== Installing Apache2 web server, |
You can install these with LAMP or XAMPP or install each separately using apt-get installer. | You can install these with LAMP or XAMPP or install each separately using apt-get installer. | ||
Line 19: | Line 19: | ||
< | < | ||
+ | |||
+ | **Enable Modules for NextCloud installation** | ||
+ | |||
+ | If you plan to install NextCloud server to run on Apache web server, then you should install the following PHP modules that are either recommended or required as prerequisites for the proper functioning NextCloud. | ||
+ | |||
+ | < | ||
+ | |||
+ | Note: If you did not begin with this guide and Apache is already installed, then you should reload Apache2 service to use these PHP modules: | ||
+ | |||
+ | < | ||
Next we will install Apache2 web server and virtual hosts. | Next we will install Apache2 web server and virtual hosts. | ||
Line 28: | Line 38: | ||
< | < | ||
sudo apt-get update | sudo apt-get update | ||
+ | |||
sudo apt-get install apache2 | sudo apt-get install apache2 | ||
</ | </ | ||
+ | Also (OR INSTEAD) install libapache2-mod-php module to work PHP with Apache2. [Go research this] | ||
+ | |||
+ | Enter the following to install it: | ||
+ | |||
+ | < | ||
==== Creating Apache VirtualHost ==== | ==== Creating Apache VirtualHost ==== | ||
Line 75: | Line 91: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | Create the appropriate directory structure in the file system, in accordance with the path specified in the above virtual host.conf file, and assign or grant the appropriate file permissions for the Apache webserver user (namely www-data: | ||
+ | |||
+ | < | ||
+ | mkdir -p / | ||
+ | chmod 755 / | ||
+ | chown www-data.www-data / | ||
+ | </ | ||
+ | |||
+ | You can now upload your project files (website) on **/ | ||
+ | |||
+ | < | ||
+ | echo "< | ||
+ | </ | ||
+ | |||
+ | ==== Next - Enable the First VirualHost ==== | ||
+ | |||
+ | Remember that we configured the first VirtualHost file under the / | ||
+ | |||
+ | Adjust the site-name and use the following command to enable this VirtualHost so that Apache can load this enabled configuration file when the Apache service is restarted (reloaded). so, to enable the new configuration VitualHost, adjust the site-name and run the following from the command line: | ||
+ | |||
+ | < | ||
+ | |||
+ | This enables the site in **/ | ||
+ | |||
+ | To activate the new configuration by reloading Apache (to bring the site ' | ||
+ | |||
+ | < | ||
+ | |||
+ | You will need to setup DNS address entries for this ' | ||
+ | |||
+ | If you do not have the DNS ready, you can temporarily map the domain by making an entry in the /etc/hosts files. | ||
+ | |||
+ | < | ||
+ | |||
+ | 192.168.2.163 | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== Creating Additional Virtual Hosts ==== | ||
+ | |||
+ | Repeat the above steps for site www1 by changing the site-name to whatever it will be, such as www2.exmample.com | ||
install_apache_mysql_php_linux_ubuntu_server.txt · Last modified: 2020/06/08 23:20 by wikiadmin