Install Apache PHP5 MySQL5.6 Debian 9.6
Install Apache PHP5 MySQL5.6 Debian 9.6
===================================================================================
==========
#apt-get update
Install Apache2
#apt-get install apache2
Enable mod_rewrite
#a2enmod rewrite
Edit 000-default.conf
#service apache2 stop
#pico /etc/apache2/sites-available/000-default.conf
==================================================================================
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
===================================================================================
=============
Install PHP5.6
#apt-get install php5.6 libapache2-mod-php5.6
[mysqld]
event-scheduler = On
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
log-error = /var/log/mysql/error.log
explicit_defaults_for_timestamp
- then save
=======================================================
===================================================================================
=========
Install PhpMyAdmin
#apt-get install phpmyadmin
#rm /etc/apache2/conf-enabled/phpmyadmin.conf
#rm /etc/apache2/conf-available/phpmyadmin.conf
- Edit /etc/apache2/ports.conf
#pico /etc/apache2/ports.conf
Add above line
Listen 2082
<VirtualHost *:2082>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/port-2082
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/port-2082>
Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Include /etc/phpmyadmin/apache.conf
</VirtualHost>
===========================================================================
- activate port-2082.conf
#a2ensite port-2082
#cd /var/www/port-2082/
#ln -s /usr/share/phpmyadmin/
#service apache2 start
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
ServerName apps.sindomakassar.com
DocumentRoot /var/www/apps
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/apps>
Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
===================================================================================
=================
- activate vhost-apps.conf
#a2ensite vhost-apps
#service apache2 start