Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ####### Packages installation #########
- sudo apt install nginx
- sudo apt install mariadb-server mariadb-client
- sudo mysql_secure_installation
- sudo apt install php7.0-fpm
- sudo apt install php7.0-curl php7.0-mysql
- sudo apt install phpmyadmin
- ####### End of packages installation ########
- ####### phpmyadmin - Add a new user in the MySQL database ###########
- # http://askubuntu.com/questions/763336/cannot-enter-phpmyadmin-as-root-mysql-5-7/763359#763359*
- # Connect as root to mysql. Need to be sudo since a recent update.
- # The '-p' will prompt for a password. If none as been set, simply press 'enter'
- sudo mysql -u root -p
- # load the mysql database
- use mysql;
- # Create the new user
- CREATE USER 'pelican'@'localhost' IDENTIFED BY 'password';
- GRANT ALL PRIVILEGES ON *.* TO 'pelican'@'localhost' WITH GRANT OPTION;
- FLUSH PRIVILEGES;
- quit;
- ####### End of adding a new user #############
- ########### facetious-pelican config file ##############
- server {
- listen 80 default_server;
- listen [::]:80 default_server;
- root /home/para/dev/facetious-pelican/html;
- index index.php index.html index.htm index.nginx-debian.html;
- server_name _;
- location ~ \.php$ {
- try_files $uri $uri/ =404
- include snippets/fastcgi-php.conf;
- include fastcgi_params;
- fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
- fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
- }
- location /phpmyadmin {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
- include fastcgi_params;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- }
- location /phpMyAdmin {
- rewrite ^/* /phpmyadmin last;
- }
- }
- ############ End of nginx vhost ##############
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement