1 2 |
sudo apt-get update sudo apt-get install apache2 |
sudo apache2ctl configtest
sudo ufw app list
sudo nano /etc/apache2/apache2.conf
Inside, at the bottom of the file, add a ServerName
directive, pointing to your primary domain name. If you do not have a domain name associated with your server, you can use your server’s public IP address:
1 |
ServerName server_domain_or_IP |
Example:- ServerName localhost
Install MySQL
1 |
sudo apt-get install mysql-server |
Note :- Installation may complete without asking for root password. Then here is the solution for setting root password and secure MySQL – MySQL Server Installed Without Password For Root user On Ubuntu 17.10 / 18.04
Install PHP
1 2 3 4 5 6 7 8 |
sudo apt install php-pear php-fpm php-dev php-zip php-curl php-xmlrpc php-gd php-mysql php-mbstring php-xml libapache2-mod-php; sudo apt-get install php-mcrypt; sudo apt-get install php-cli; sudo apt-get install php-gd; sudo systemctl restart apache2 or sudo /etc/init.d/apache2 restart |