The next step is to change the Apache2 server port for another, to avoid overlapping with the nginx server that hosts our AtoM.
We edit the file /etc/apache2/ports.conf:
sudo nano /etc/apache2/ports.conf
And we change in the line where it says "Listen" the port to our liking, in this case we use the 333:
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 333
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
We save the file and proceed to edit the following:
sudo nano /etc/apache2/sites-enabled/000-default.conf
And we change the port also in the first line:
<VirtualHost _default_:333>
# 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
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerName AtoM
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Once this is done, we proceed to restart the service:
sudo systemctl restart apache2.service
Now, we only need to download the PHP MY Admin package from its official site, and using Win SCP copy it to the path / var / www / html having previously decompressed it.
We do not use the option to install using sudo apt-get install phpmyadmin since for different reasons it is not functional.
Once these files are copied, we restart the Apache2 server again:
sudo systemctl restart apache2.service
And we can access PHP My Admin from any browser of any workstation in the local network using:
http: // (ip of my server): 333
(let's modify the port for which we had chosen when configuring the Apache if it is different)
We can optionally install My Web SQL that presents some functionalities different from PHP MY Admin.
We simply download the package, unzip it and copy it to the same PHP My Admin directory.
We do this instead of creating a Virtual Host in Apache for convenience, since it will be accessible under the same port as PHP My Admin but another directory, therefore, to access we use:
http: // ip-server: 333 / MyWebSQL /
Once this is done, we proceed to restart the nginx service that we had stopped:
sudo systemctl restart nginx
That's all!
Mario Villar-Corbo
SysAdmin
Radiodifusión Nacional
Uruguay
David Juhasz Senior Developer Artefactual Systems Inc. www.artefactual.com