PROGRAMMING

MINTE9
REMEMBERS




Install Apache

Install apache with apt-get
 
sudo apt-get update

sudo apt-get install apache2
Testing
 
// browser: http://localhost

// directory: /var/www/html/index.html
Restart apache
 
sudo service apache2 restart
Virtual Host    (2/2)

Virtual host

 
mkdir /var/www/site.local

sudo chown -R www-data: /var/www/site.local
sudo chmod -R 755 /var/www/site.local

cd /etc/apache2/sites-available
touch /etc/apache2/sites-available/refresh.local.conf
Symlink
 
sudo ln -s /etc/apache2/sites-available/refresh.local.conf /etc/apache2/sites-enabled/

sudo vi /etc/hosts

sudo gedit /etc/apache2/apache2.conf

sudo systemctl restart apache2

# http://site.local
chmod-755
 
// 755 means read and execute access for everyone

// 755 means write access for the owner of the file.
.htaccess
 
sudo a2enmod rewrite

AllowOverride All // apache2.conf - default None

sudo service apache2 restart

Questions    
4. Php
03 . Apache
Last update:   11-09-2021

        A B C D E F
🔔
1/4