Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iptables -A INPUT -p tcp --dport 7171 -j ACCEPT
- iptables -A INPUT -p tcp --dport 7172 -j ACCEPT
- iptables -A INPUT -p tcp --dport 80 -j ACCEPT
- iptables -A INPUT -p tcp --dport 8090 -j ACCEPT
- iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
- iptables -A INPUT -p tcp --dport 443 -j ACCEPT
- iptables -A INPUT -p tcp --dport 4499 -j ACCEPT
- iptables -A INPUT -p tcp --dport 8245 -j ACCEPT
- iptables -A INPUT -p tcp --dport 7173 -j ACCEPT
- apt-get update
- apt-get upgrade
- apt-get install nginx
- service nginx start
- lscpu
- nano /etc/nginx/nginx.conf
- worker_processes 4; -- troca o 4 pela quantidade de cpu q seu pc tem
- service nginx restart
- nano /etc/nginx/sites-available/default
- server {
- listen 80;
- listen [::]:80;
- ***server_name EXTERNAL IP;***
- root /usr/share/nginx/html;
- index ***index.php*** index.html index.htm;
- # Make site accessible from http://localhost/
- server_name server.unixmen.local
- }
- location ~ \.php$ {
- ***try_files $uri =404; ---------> Add this line
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
- #
- # # With php5-cgi alone:
- # fastcgi_pass 127.0.0.1:9000;
- # # With php5-fpm:
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_index index.php;
- include fastcgi.conf;
- }
- nginx -t
- service nginx restart
- apt-get install mariadb-server mariadb-client
- service mysql status ---------- opcional
- apt-get install php5 php5-fpm php5-mysql
- nano /etc/php5/fpm/php.ini
- ctrl+w -> cgi.fix_pathinfo=1 --------- tirar ; e mudar 1 para 0
- service php5-fpm restart
- nano /usr/share/nginx/html/info.php
- <?php phpinfo() ?>
- nano /etc/php5/fpm/pool.d/www.conf
- ctrl+w -> listen = /var/run/php5-fpm.sock ---------- tirar ; e trocar /var/run/php5-fpm.sock por 127.0.0.1:9000
- service php5-fpm restart
- nano /etc/nginx/sites-available/default
- ctrl+w -> fastcgi_pass unix:/var/run/php5-fpm.sock ------ comentar com # e descomentar a linha fastcgi_pass 127.0.0.1:9000;
- service nginx restart
- apt-get install phpmyadmin
- ln -s /usr/share/phpmyadmin/ /usr/share/nginx/html
- service nginx restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement