nano /etc/apt/sources.list deb http://nginx.org/packages/ubuntu/ raring nginx deb-src http://nginx.org/packages/ubuntu/ raring nginx wget http://nginx.org/keys/nginx_signing.key apt-key add nginx_signing.key apt-get update apt-get install nginx apt-get install php5-cli php5-common php5-mysql php5-gd php5-fpm php5-cgi php5-fpm php-pear php5-mcrypt -y nano /etc/php5/fpm/php.ini ;cgi.fix_pathinfo = 1 cgi.fix_pathinfo = 0 service php5-fpm restart nano /etc/nginx/conf.d/default.conf server { listen 80; root /usr/share/nginx/html; index index.php index.html index.htm; server_name localhost; location / { try_files $uri $uri/ /index.html; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/www; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { #fastcgi_pass 127.0.0.1:9000; # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } nano /usr/share/nginx/html/index.php <?php phpinfo(); ?> rm /usr/share/nginx/html/index.html apt-get install mysql-server mysql-client mysql-common apt-get install memcached php5-memcached apt-get install phpmyadmin 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/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $request_filename; include /etc/nginx/fastcgi_params; } location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { root /usr/share/; } } location /phpMyAdmin { rewrite ^/* /phpmyadmin last; } server { listen 80; root /usr/share/nginx/html; index index.php index.html index.htm; server_name localhost; location / { try_files $uri $uri/ /index.html; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/www; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { #fastcgi_pass 127.0.0.1:9000; # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } 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/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $request_filename; include /etc/nginx/fastcgi_params; } location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { root /usr/share/; } } location /phpMyAdmin { rewrite ^/* /phpmyadmin last; } } apt-get install php5-xdebug sudo add-apt-repository ppa:webupd8team/java -y sudo apt-get update sudo apt-get install oracle-jdk7-installer nano /etc/php5/fpm/php.ini zend.ze1_compatibility_mode = off [xdebug] xdebug.remote_enable = On xdebug.max_nesting_level = 500 xdebug.remote_port = 9001 Source: https://habr.com/ru/post/181848/
All Articles