Страница 1 из 2

После инсталляции 404

Добавлено: 09 янв 2019, 14:13
eliajah
LEMP стек на Ubuntu 18.4
Установка проходит штатно
https://yadi.sk/i/FxsAcR98ugACoQ
https://yadi.sk/i/5dNpceOya4V_iQ
https://yadi.sk/i/obZgZZLVREVIpQ
https://yadi.sk/i/qUJTMvQ9LPrudQ
нажимаем вход и...
https://yadi.sk/i/PO-CjfpV2kDVMQ
в общем при переходе по адресу 192.168.4.126/rukovoditel/ редиректит на http://192.168.4.126/index.php?module=dashboard/ с ошибкой 404

Re: После инсталляции 404

Добавлено: 09 янв 2019, 15:13
support
Попробуйте открыть http://192.168.4.126/rukovoditel/

Re: После инсталляции 404

Добавлено: 09 янв 2019, 16:18
eliajah
Результат тот же
404

Re: После инсталляции 404

Добавлено: 09 янв 2019, 16:23
support
Проверьте права на файл index.php и на папку.
Странно, что у вас перенаправило не в папку а в корень.
Подозреваю что что то не так настроено, может в .htaccess что то есть...

Re: После инсталляции 404

Добавлено: 09 янв 2019, 16:59
eliajah
в .htaccess одна строчка - AddDefaultCharset utf-8
права:
user@lemp:~$ ll /var/www/html/rukovoditel/
total 120
drwxrwxr-x 18 www-data www-data 4096 дек 28 07:24 ./
drwxr-xr-x 3 root root 4096 дек 28 07:24 ../
drwxrwxr-x 2 www-data www-data 4096 июн 9 2018 api/
drwxrwxr-x 2 www-data www-data 4096 авг 28 07:23 backups/
drwxrwxr-x 2 www-data www-data 4096 июн 9 2018 cache/
drwxrwxr-x 2 www-data www-data 4096 янв 9 10:50 config/
drwxrwxr-x 2 www-data www-data 4096 сен 3 17:50 cron/
drwxrwxr-x 3 www-data www-data 4096 июн 9 2018 css/
-rw-rw-r-- 1 www-data www-data 1286 июн 16 2013 favicon.ico
-rw-rw-r-- 1 www-data www-data 23 мая 13 2015 .htaccess
drwxrwxr-x 5 www-data www-data 4096 июн 22 2018 images/
drwxrwxr-x 7 www-data www-data 4096 июн 9 2018 includes/
-rw-rw-r-- 1 www-data www-data 840 июл 1 2016 index.php
drwxrwxr-x 10 www-data www-data 4096 июн 9 2018 install/
drwxrwxr-x 29 www-data www-data 4096 авг 5 08:09 js/
-rw-rw-r-- 1 www-data www-data 26456 дек 29 2017 license.txt
drwxrwxr-x 2 www-data www-data 4096 сен 4 10:10 log/
drwxrwxr-x 18 www-data www-data 4096 авг 29 14:00 modules/
drwxrwxr-x 2 www-data www-data 4096 июн 9 2018 plugins/
-rw-rw-r-- 1 www-data www-data 1284 фев 27 2018 readme.txt
-rw-rw-r-- 1 www-data www-data 28 июн 16 2013 robots.txt
drwxrwxr-x 7 www-data www-data 4096 авг 5 09:07 template/
drwxrwxr-x 2 www-data www-data 4096 июн 9 2018 tmp/
drwxrwxr-x 7 www-data www-data 4096 сен 4 08:40 uploads/

Re: После инсталляции 404

Добавлено: 09 янв 2019, 17:57
support
В любом случае - это не ошибка программы. Ваш сервер не видит файл index.php по этому и выдает 404.
Почему так, не могу сказать, что то не так с настройками. Пробуйте на другом сервере.

Re: После инсталляции 404

Добавлено: 09 янв 2019, 18:04
flygerua
в наглую не прописывали http://192.168.4.126/rukovoditel/index. ... dashboard/


вариант второй зайти в \apache\conf\httpd.conf
и проверить корневую папку прописан в конфигурационном файле

DocumentRoot "/xampp/htdocs/"
<Directory "/xampp/htdocs/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks Includes ExecCGI

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>

Re: После инсталляции 404

Добавлено: 10 янв 2019, 17:51
eliajah
flygerua писал(а): 09 янв 2019, 18:04 в наглую не прописывали http://192.168.4.126/rukovoditel/index. ... dashboard/


вариант второй зайти в \apache\conf\httpd.conf
и проверить корневую папку прописан в конфигурационном файле

DocumentRoot "/xampp/htdocs/"
<Directory "/xampp/htdocs/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks Includes ExecCGI

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
В наглую не заходит, выдает тоже самое, и у меня не apache а nginx
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 768;
# multi_accept on;
}

http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# SSL Settings
##

ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

##
# Logging Settings
##

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

##
# Gzip Settings
##

gzip on;

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}


#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateW ... ePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}

Re: После инсталляции 404

Добавлено: 14 янв 2019, 16:27
flygerua
Прорвете правильность нахождения корневой папки nginx для сайта.

Стандартный каталог Nginx на Debian -

Код: Выделить всё

/var/www/nginx-default
Вы можете проверить файл:

Код: Выделить всё

/etc/nginx/sites-enabled/default
и найдите

Код: Выделить всё

server {
        listen   80 default;
        server_name  localhost;

        access_log  /var/log/nginx/localhost.access.log;

        location / {
                root   /var/www/nginx-default;
                index  index.html index.htm;
        }
Корень - это местоположение по умолчанию.

Re: После инсталляции 404

Добавлено: 15 янв 2019, 12:52
eliajah
flygerua писал(а): 14 янв 2019, 16:27 Прорвете правильность нахождения корневой папки nginx для сайта.

Стандартный каталог Nginx на Debian -

Код: Выделить всё

/var/www/nginx-default
Вы можете проверить файл:

Код: Выделить всё

/etc/nginx/sites-enabled/default
и найдите

Код: Выделить всё

server {
        listen   80 default;
        server_name  localhost;

        access_log  /var/log/nginx/localhost.access.log;

        location / {
                root   /var/www/nginx-default;
                index  index.html index.htm;
        }
Корень - это местоположение по умолчанию.
У меня, сделано через виртуальные хосты, файл конфига хоста:
server {
listen 80;
listen [::]:80;

# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;

root /var/www/html/rukovoditel;

# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;

server_name rukovoditel;

location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}

# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}


сам виртуальный хост лежит в
user@lemp:~$ ls /var/www/html/rukovoditel/
api backups cache config cron css favicon.ico images includes index.php install js license.txt log modules plugins readme_ru.txt readme.txt robots.txt template tmp uploads

в etc/nginx/sites-enabled/default

server {
listen 80 default_server;
listen [::]:80 default_server;

# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;

root /var/www/html;

# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;

server_name _;

location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}

# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}