ðòïåëôù 


  áòèé÷ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  óôáôøé 


  ðåòóïîáìøîïå 


  ðòïçòáííù 



ðéûéôå
ðéóøíá












     áòèé÷ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nginx + phpmyadmin alias


  • To: <nginx-ru@xxxxxxxxx>
  • Subject: nginx + phpmyadmin alias
  • From: áÒÔÅÍ <artem.ye@xxxxxxx>
  • Date: Mon, 13 May 2013 19:53:23 +0300
  • Content-language: ru
  • Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=SFvq02wGARpIPAk3mnr7b9Ib/dTy2Dt23AP/pZIhX5c=; b=JbtdxWCs1noP9KRlLbpFkNPrl6mtu3jpllyTz76PYjlWGyvBzi4O+/BdbU61dihwF/UEwEZDtMBg/+VGGKOSBFtZtgJKoAIrTiLwrg1JcmeETcTAsqzYYeVYlRMCngIFQMt9GAEWgtPF936bOnJXPT2bfM0Y70ic7TU1rXl/c3g=;
  • Thread-index: Ac5P+mFtXX/aaa2nRaqwupW4FA8KNQ==

úÄÒÁ×ÓÔ×ÕÊÔÅ.

 

ïÂßÑÓÎÉÔÅ ÐÏÖÁÌÕÊÓÔÁ ÐÏÞÅÍÕ ÍÏÊ Nginx ×ÏÚ×ÒÁÝÁÅÔ ÏÛÉÂËÕ 404 ÐÒÉ ÏÂÒÁÝÅÎÉÉ Ë /phpmyadmin.

 

óÁÊÔ ÎÁ opencart ÌÅÖÉÔ × /usr/local/www/upload/

óÀÄÁ ÖÅ ÓÄÅÌÁÎÁ ÓÉÍ×ÏÌÉÞÅÓËÁÑ ÓÓÙÌËÁ ÎÁ phpMyAdmin, ËÏÔÏÒÙÊ ÎÁÈÏÄÉÔÓÑ × /usr/local/www.

 

÷ÏÔ ËÏÎÆÉÇ:

 

server {

 

ššššššš listenšššššš XXX.XXX.XXX.XXX:80;

ššššššš server_nameš localhost;

 

ššššššš root /usr/local/www/upload/;

ššššššš indexš index.php index.html;

 

ššššššš location / {

ššššššššššš indexš index.php;

ššššššššššš try_files $uri @opencart;

ššššššš }

 

ššššššš location @opencart {

ššššššššššššššš rewrite ^/(.+)$ /index.php?_route_=$1 last;

ššššššš }

 

ššššššš location /admin {

ššššššššššš indexš index.php;

ššššššš }

 

ššššššš location /phpMyAdmin {

ššššššššššš indexš index.php;

ššššššš }

 

ššššššš location /phpmyadmin(.*)$ {

šššššššššš rewrite ^/(.*)$ /phpMyAdmin/index.php$1 last;

ššššššš }

 

ššššššš if (!-e $request_filename) {

ššššššššššš rewrite ^/(.*)$ /index.php?_route_=$1 last;

ššššššš }

 

ššššššš location ~ \.php$ {

ššššššššššššššš fastcgi_pass unix:/var/run/php-fpm.sock;

ššššššššššššššš fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

ššššššššššššššš include fastcgi_params;

ššššššššššššššš fastcgi_param REDIRECT_STATUS 200;

ššššššššššššššš fastcgi_read_timeout 3600;

 

ššššššššššššššš proxy_set_header X-Real-IP $remote_addr;

ššššššššššššššš proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

šššššššš šššššššproxy_set_header Host $http_host;

ššššššššššššššš proxy_redirect off;

ššššššš }

 

ššššššš error_pagešš 500 502 503 504š /50x.html;

 

ššššššš location = /50x.html {

ššššššššššš rootšš /usr/local/www/nginx-dist;

ššššššš }

ššš }

 

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.