PHP.SU

Программирование на PHP, MySQL и другие веб-технологии
PHP.SU Портал     На главную страницу форума Главная     Помощь Помощь     Поиск Поиск     Поиск Яндекс Поиск Яндекс     Вакансии  Пользователи Пользователи


 Страниц (2): « 1 [2]   

> Без описания
jpchvltvb
Отправлено: 11 Июля, 2019 - 17:15:08
Post Id


Новичок


Покинул форум
Сообщений всего: 26
Дата рег-ции: Май 2019  


Помог: 0 раз(а)




настраивал по этой ссылке
https://www[dot]masterwebs[dot]ru/topic/[dot][dot][dot]-hostov-v-nginx/
--- Добавлено ---
server {

charset utf-8;
server_name php.zzz;
set $yii_bootstrap "index.php";

access_log /var/log/nginx/php.zzz-access.log;
error_log /var/log/nginx/php.zzz-error.log;
root /var/www/php.zzz;
index $yii_bootstrap;

set $htdocs /var/www/php.zzz;

location / {

# Redirect everything that isn't real file to yii bootstrap file including arguments.
try_files $uri $uri/ /$yii_bootstrap?$args;
}

include /etc/nginx/_location_php;

}

файл
php.zzz
--- Добавлено ---
server {

# Listen on port 81
listen 80;
server_name pma.php.zzz;

# Server name being used (exact name, wildcards or regular expression)
# server_name phpmyadmin.my;

root /usr/share/phpmyadmin;

# Logging
# error_log /var/log/phpmyadmin.access_log;
# access_log /var/log/phpmyadmin.error_log;


location / {
index index.php;
}

## Images and static content is treated different
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log off;
expires 360d;
}

location ~ /\.ht {
deny all;
}

# location ~ /(libraries|setup/frames|setup/libs) {
# deny all;
# return 404;
#}

# Pass the PHP scripts to FastCGI server
location ~ \.php$ {

fastcgi_pass unix:/run/php/php7.2-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;
fastcgi_param HTTPS off;
}
}
--- Добавлено ---
этот файл не получилось
--- Добавлено ---
сейчас так
location ~ \.php$ {
try_files $fastcgi_script_name =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $htdocs$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
fastcgi_read_timeout 6000;
}
--- Добавлено ---
какие логи показать
их много
--- Добавлено ---
access.log.1
127.0.0.1 - - [09/Jul/2019:15:54:12 +0300] "GET / HTTP/1.1" 200 396 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"




error.log.1

2019/07/09 15:55:04 [notice] 12145#12145: signal process started
2019/07/10 09:30:48 [notice] 4021#4021: signal process started
--- Добавлено ---
php.zzz-access.log

127.0.0.1 - - [10/Jul/2019:09:59:20 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
--- Добавлено ---
php.zzz-access.log.1
127.0.0.1 - - [09/Jul/2019:15:56:38 +0300] "GET / HTTP/1.1" 200 63 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [09/Jul/2019:15:56:57 +0300] "GET /1.php HTTP/1.1" 200 25314 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [09/Jul/2019:15:57:11 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [09/Jul/2019:20:46:52 +0300] "GET / HTTP/1.1" 200 63 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [09/Jul/2019:20:46:56 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [09/Jul/2019:20:52:30 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [09/Jul/2019:21:11:11 +0300] "GET / HTTP/1.1" 200 63 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [09/Jul/2019:21:11:26 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [09/Jul/2019:21:17:36 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [09/Jul/2019:21:17:40 +0300] "GET / HTTP/1.1" 200 63 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [09/Jul/2019:21:19:05 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [09/Jul/2019:21:19:10 +0300] "GET / HTTP/1.1" 200 63 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [09/Jul/2019:21:28:51 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [09/Jul/2019:21:28:56 +0300] "GET / HTTP/1.1" 200 63 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [10/Jul/2019:09:29:22 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [10/Jul/2019:09:29:26 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [10/Jul/2019:09:29:28 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [10/Jul/2019:09:29:32 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [10/Jul/2019:09:29:34 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [10/Jul/2019:09:29:38 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [10/Jul/2019:09:29:40 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [10/Jul/2019:09:30:51 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
127.0.0.1 - - [10/Jul/2019:09:30:52 +0300] "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
--- Добавлено ---
php.zzz-error.log

2019/07/10 09:59:20 [error] 4022#4022: *4 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
--- Добавлено ---
php.zzz-error.log.1
2019/07/09 15:57:11 [error] 12146#12146: *2 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
2019/07/09 20:46:56 [error] 892#892: *1 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
2019/07/09 20:52:30 [error] 892#892: *3 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
2019/07/09 21:11:26 [error] 4401#4401: *2 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
2019/07/09 21:17:36 [error] 4401#4401: *4 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
2019/07/09 21:19:05 [error] 4401#4401: *6 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
2019/07/09 21:28:51 [error] 4401#4401: *8 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
2019/07/10 09:29:22 [error] 852#852: *1 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
2019/07/10 09:29:26 [error] 852#852: *1 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
2019/07/10 09:29:28 [error] 852#852: *1 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
2019/07/10 09:29:32 [error] 852#852: *1 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
2019/07/10 09:29:34 [error] 852#852: *1 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
2019/07/10 09:29:38 [error] 852#852: *1 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
2019/07/10 09:29:40 [error] 852#852: *1 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
2019/07/10 09:30:51 [error] 4022#4022: *2 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
2019/07/10 09:30:52 [error] 4022#4022: *2 directory index of "/var/www/php.zzz/phpmyadmin/" is forbidden, client: 127.0.0.1, server: php.zzz, request: "GET /phpmyadmin/ HTTP/1.1", host: "php.zzz"
 
 Top
andrewkard
Отправлено: 13 Июля, 2019 - 08:53:50
Post Id


Участник


Покинул форум
Сообщений всего: 1347
Дата рег-ции: Нояб. 2014  


Помог: 30 раз(а)




А так?
CODE (javascript):
скопировать код в буфер обмена
  1.  
  2. server {
  3.  
  4. # Listen on port 81
  5. listen 80;
  6. server_name pma.php.zzz;
  7.  
  8. # Server name being used (exact name, wildcards or regular expression)
  9. # server_name phpmyadmin.my;
  10.  
  11. root /usr/share/phpmyadmin;
  12.  
  13. # Logging
  14. # error_log /var/log/phpmyadmin.access_log;
  15. # access_log /var/log/phpmyadmin.error_log;
  16.  
  17.  
  18. location / {
  19. try_files $uri /index.html index.php;
  20. }
  21.  
  22. ## Images and static content is treated different
  23. location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
  24. access_log off;
  25. expires 360d;
  26. }
  27.  
  28. location ~ /\.ht {
  29. deny all;
  30. }
  31.  
  32. # location ~ /(libraries|setup/frames|setup/libs) {
  33. # deny all;
  34. # return 404;
  35. #}
  36.  
  37. # Pass the PHP scripts to FastCGI server
  38. location ~ \.php$ {
  39.  
  40. fastcgi_pass unix:/run/php/php7.2-fpm.sock;
  41. fastcgi_split_path_info ^(.+\.php)(/.*)$;
  42. include fastcgi_params;
  43. fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;
  44. fastcgi_param HTTPS off;
  45. }
  46. }
  47.  
 
 Top
LIME
Отправлено: 13 Июля, 2019 - 12:34:05
Post Id



Активный участник


Покинул форум
Сообщений всего: 10389
Дата рег-ции: Нояб. 2010  


Помог: 307 раз(а)




Бегло глянул
Причина вроде убрана
"Код смотрел, должно работать"


-----
DDD
 
 Top
jpchvltvb
Отправлено: 14 Июля, 2019 - 12:13:04
Post Id


Новичок


Покинул форум
Сообщений всего: 26
Дата рег-ции: Май 2019  


Помог: 0 раз(а)




не помог данный код
 
 Top
LIME
Отправлено: 14 Июля, 2019 - 14:39:40
Post Id



Активный участник


Покинул форум
Сообщений всего: 10389
Дата рег-ции: Нояб. 2010  


Помог: 307 раз(а)




Да откажись ты уже от пма и все
Поставь mysql workbench или другой клиент
Или из терминала пользуйся


-----
DDD
 
 Top
andrewkard
Отправлено: 14 Июля, 2019 - 17:40:42
Post Id


Участник


Покинул форум
Сообщений всего: 1347
Дата рег-ции: Нояб. 2014  


Помог: 30 раз(а)




jpchvltvb пишет:
не помог данный код

Еще раз, в /etc/nginx/sites-available, положите файл pma.php.zzz с таким содержимым
CODE (javascript):
скопировать код в буфер обмена
  1.  
  2. server {
  3.  
  4. # Listen on port 81
  5. listen 80;
  6. server_name pma.php.zzz;
  7.  
  8. # Server name being used (exact name, wildcards or regular expression)
  9. # server_name phpmyadmin.my;
  10.  
  11. root /usr/share/phpmyadmin;
  12.  
  13. # Logging
  14. # error_log /var/log/phpmyadmin.access_log;
  15. # access_log /var/log/phpmyadmin.error_log;
  16.  
  17.  
  18. location / {
  19. try_files $uri /index.html index.php;
  20. }
  21.  
  22. ## Images and static content is treated different
  23. location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
  24. access_log off;
  25. expires 360d;
  26. }
  27.  
  28. location ~ /\.ht {
  29. deny all;
  30. }
  31.  
  32. # location ~ /(libraries|setup/frames|setup/libs) {
  33. # deny all;
  34. # return 404;
  35. #}
  36.  
  37. # Pass the PHP scripts to FastCGI server
  38. location ~ \.php$ {
  39. include snippets/fastcgi-php.conf;
  40. fastcgi_pass unix:/run/php/php7.2-fpm.sock;
  41. }
  42. }
  43.  
  44.  


в /etc/nginx/sites-enabled делаете символическую ссылку
CODE (htmlphp):
скопировать код в буфер обмена
  1.  
  2. sudo ln -s /etc/nginx/sites-available/pma.php.zzz /etc/nginx/sites-enabled/
  3.  

Проводите тест и перезагружаете nginx
CODE (htmlphp):
скопировать код в буфер обмена
  1.  
  2. nginx -t
  3. sudo service nginx restart
  4.  

Если не поможет, попробуйте вот по этой инструкции сделать:
https://devacademy[dot]ru/article/nginx-ubuntu-1404/
 
 Top
Страниц (2): « 1 [2]
Сейчас эту тему просматривают: 1 (гостей: 1, зарегистрированных: 0)
« Работа с СУБД »


Все гости форума могут просматривать этот раздел.
Только зарегистрированные пользователи могут создавать новые темы в этом разделе.
Только зарегистрированные пользователи могут отвечать на сообщения в этом разделе.
 



Powered by PHP  Powered By MySQL  Powered by Nginx  Valid CSS  RSS

 
Powered by ExBB FM 1.0 RC1. InvisionExBB