Apache сервер без конфигурации перезаписи. Как это возможно, что маршрутизация к несуществующим PHP файлам в пути? - PullRequest
0 голосов
/ 22 апреля 2020

На этот вопрос нет ответа при перезаписи URL с помощью PHP либо Как отладить скрипт перезаписи htaccess .

У меня есть доступ к файловой системе сервер, но не на консоль сервера. Сервер работает apache и веб-сайт PHP.

Веб-сайт работает и работает нормально. Он имеет несколько URL-адресов в виде «domain.com/intro». Тем не менее, когда я go на root пути веб-сайта, то есть /var/www/html/, нет ничего подобного /var/www/html/intro.html или /var/www/html/intro.php или чему-либо еще, что читает intro.

Я знаю содержимое приходит откуда-то еще "/ var / www/html/templates/intro.tpl.phpbut I cannot figure out how Apache server knows that upon receiving a request for / intro`. Для этого ему нужно запустить кучу других PHP файлов, чтобы в этом файле шаблона было sh. Как это возможно?

Я смотрю на конфигурацию сервера Apache, но не вижу никаких настроек, которые делают что-то подобное. Также нет файлов .htaccess.

Здесь apache conf :

DefaultRuntimeDir ${APACHE_RUN_DIR}


PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5


# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}


HostnameLookups Off

ErrorLog ${APACHE_LOG_DIR}/error.log


LogLevel debug

# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

# Include list of ports to listen on
Include ports.conf


# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>

<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

#<Directory /srv/>
#       Options Indexes FollowSymLinks
#       AllowOverride None
#       Require all granted
#</Directory>





#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...