什么';这个错误是怎么回事?404 php不';不行,我什么都试过了

什么';这个错误是怎么回事?404 php不';不行,我什么都试过了,php,login,ubuntu-14.04,Php,Login,Ubuntu 14.04,-当我访问此页面时,它应该加载login.php,我在XAMPP localhost上进行了尝试,一切正常。 我正在使用Ubuntu14.0,我试图修改.httacces,我启用了writemode和许多其他工具?有什么意见吗 我用必要的东西编辑了这篇文章,访问日志,错误日志,httacces,apache2配置 访问日志 错误日志 httaccess 重新启动发动机 重写cond%{REQUEST_FILENAME}-F 重写规则^index.php[L] 选项如下符号链接多视图 允许超越所

-当我访问此页面时,它应该加载login.php,我在XAMPP localhost上进行了尝试,一切正常。 我正在使用Ubuntu14.0,我试图修改.httacces,我启用了writemode和许多其他工具?有什么意见吗

我用必要的东西编辑了这篇文章,访问日志,错误日志,httacces,apache2配置

访问日志 错误日志 httaccess

重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写规则^index.php[L]
选项如下符号链接多视图
允许超越所有
命令允许,拒绝
通融

编辑apache配置文件

# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.

# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
#   /etc/apache2/
#   |-- apache2.conf
#   |   `--  ports.conf
#   |-- mods-enabled
#   |   |-- *.load
#   |   `-- *.conf
#   |-- conf-enabled
#   |   `-- *.conf
#   `-- sites-enabled
#       `-- *.conf
#
#
# * apache2.conf is the main configuration file (this file). It puts the pieces
#   together by including all remaining configuration files when starting up the
#   web server.
#
# * ports.conf is always included from the main configuration file. It is
#   supposed to determine listening ports for incoming connections which can be
#   customized anytime.
#
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
#   directories contain particular configuration snippets which manage modules,
#   global configuration fragments, or virtual host configurations,
#   respectively.
#
#   They are activated by symlinking available configuration files from their
#   respective *-available/ counterparts. These should be managed by using our
#   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
#   their respective man pages for detailed information.
#
# * The binary is called apache2. Due to the use of environment variables, in
#   the default configuration, apache2 needs to be started/stopped with
#   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
#   work with the default configuration.


# Global configuration
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the Mutex documentation (available
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
Mutex file:${APACHE_LOCK_DIR} default

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5


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

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog /var/www/html/error.log

#
# LogLevel: Control the severity of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn

# 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 All
   # 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>
<Directory "/var/www/html">
Allowoverride All
</Directory>



# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
    Require all denied
</FilesMatch>


#
# 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

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Include /etc/phpmyadmin/apache.conf
<VirtualHost *.80>
    DocumentRoot "/var/www/html/"
    ServerName carloh.ml
</VirtualHost>
LoadModule rewrite_module modules/mod_rewrite.so
<IfModule mod_suphp.c>
suPHP_UserGroup root root
</IfModule>
#这是主要的Apache服务器配置文件。它包含
#为服务器提供指令的配置指令。
#看http://httpd.apache.org/docs/2.4/ 有关
#关于特定于Debian的指令和/usr/share/doc/apache2/README.Debian
#提示。
#
#
#Apache2配置如何在Debian中工作的摘要:
#Debian中的Apache2Web服务器配置与
#upstream建议的配置web服务器的方法。这是因为Debian的
#默认Apache2安装尝试添加和删除模块,
#虚拟主机,以及尽可能灵活的额外配置指令
#以便尽可能轻松地自动化更改和管理服务器
#可能。
#它被分割成几个文件,形成所概述的配置层次结构
#下面的所有文件都位于/etc/apache2/目录中:
#
#/etc/apache2/
#|--apache2.conf
#|`--ports.conf
#|--mods已启用
#| 124;--*.装载
#|`-*.conf
#|--conf已启用
#|`-*.conf
#`--已启用站点
#`-*.conf
#
#
#*apache2.conf是主配置文件(此文件)。它把碎片
#在启动时包括所有剩余的配置文件
#网络服务器。
#
#*ports.conf始终包含在主配置文件中。它是
#应该确定传入连接的侦听端口,这些端口可以
#随时定制。
#
#*mods enabled/、conf enabled/和sites enabled中的配置文件/
#目录包含管理模块的特定配置代码段,
#全局配置片段或虚拟主机配置,
#分别。
#
#它们通过将其上的可用配置文件符号链接来激活
#相应*-可用/副本。这些应该通过使用我们的
#助手a2enmod/a2dismod、a2ensite/a2disconf和a2enconf/a2disconf。看见
#有关详细信息,请参阅各自的手册页。
#
#*二进制文件称为apache2。由于使用了环境变量,在
#默认配置apache2需要使用启动/停止
#/etc/init.d/apache2或apache2ctl。直接调用/usr/bin/apache2不会
#使用默认配置。
#全局配置
#
#
#ServerRoot:目录树的顶部,服务器的
#保留配置、错误和日志文件。
#
#注意!如果要将其放置在NFS(或其他网络)上
#然后请阅读互斥文件系统文档(可用
#at);
#你会省去很多麻烦。
#
#不要在目录路径的末尾添加斜杠。
#
#ServerRoot“/etc/apache2”
#
#接受序列化锁定文件必须存储在本地磁盘上。
#
互斥文件:${APACHE\u LOCK\u DIR}默认值
#
#PidFile:服务器应在其中记录其进程的文件
#启动时的标识号。
#这需要在/etc/apache2/envvars中设置
#
PidFile${APACHE_PID_文件}
#
#超时:接收和发送超时之前的秒数。
#
超时300
#
#KeepAlive:是否允许持久连接(超过
#每个连接一个请求)。设置为“关闭”以停用。
#
继续
#
#MaxKeepAliverRequests:允许的最大请求数
#在持久连接期间。设置为0以允许无限量。
#我们建议您将此数字保持在较高水平,以获得最佳性能。
#
MaxKeepAliveRequests 100
#
#KeepAliveTimeout:等待来自的下一个请求的秒数
#同一连接上的同一客户端。
#
保持超时
#这些需要在/etc/apache2/envvars中设置
用户${APACHE\u RUN\u User}
组${APACHE\u RUN\u Group}
#
#HostnameLookups:记录客户机的名称或仅记录其IP地址
#例如,www.apache.org(开)或204.62.129.132(关)。
#默认设置是关闭的,因为如果人们
#必须故意打开此功能,因为启用它意味着
#每个客户端请求将导致至少一个对客户端的查找请求
#名称服务器。
#
主机名查询
#ErrorLog:错误日志文件的位置。
#如果未在中指定ErrorLog指令
#容器中,将显示与该虚拟主机相关的错误消息
#在这里登录。如果您*确实*为
#容器,该主机的错误将记录在那里而不是这里。
#
ErrorLog/var/www/html/error.log
#
#日志级别:控制记录到错误日志的消息的严重性。
#可用值:trace8、…、trace1、调试、信息、通知、警告、,
#错误、暴击、警报、紧急情况。
#还可以为特定模块配置日志级别,例如。
#“日志级别信息ssl:警告”
#
日志级别警告
#包括模块配置:
包括可选mods启用/*.加载
IncludeOptional mods enabled/*.conf
#包括要侦听的端口列表
Include ports.conf
#设置Apache2 HTTPD服务器的默认安全模型。是的
#不允许访问/usr/share和/var/www之外的根文件系统。
#前者由Debian中打包的web应用程序使用,
#后者可用于web服务器提供服务的本地目录。如果
#您的系统正在为/srv中您必须允许的子目录中的内容提供服务
#访问此处或任何相关虚拟主机。
选项如下符号链接
允许超越所有
#要求所有de
[Sun Nov 25 18:00:02.736515 2018] [php7:notice] [pid 45054] [client 203.190.35.172:14913] PHP Notice:  Undefined index: user in /var/www/html/demo/inc/header.inc.php on line 335, referer: http://80.211.163.192/
[Sun Nov 25 18:00:14.014701 2018] [php7:notice] [pid 45061] [client 203.190.35.172:14919] PHP Notice:  Undefined index: user in /var/www/html/demo/inc/header.inc.php on line 335, referer: http://80.211.163.192/
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>
<Directory /var/www/html/demo>
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.

# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
#   /etc/apache2/
#   |-- apache2.conf
#   |   `--  ports.conf
#   |-- mods-enabled
#   |   |-- *.load
#   |   `-- *.conf
#   |-- conf-enabled
#   |   `-- *.conf
#   `-- sites-enabled
#       `-- *.conf
#
#
# * apache2.conf is the main configuration file (this file). It puts the pieces
#   together by including all remaining configuration files when starting up the
#   web server.
#
# * ports.conf is always included from the main configuration file. It is
#   supposed to determine listening ports for incoming connections which can be
#   customized anytime.
#
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
#   directories contain particular configuration snippets which manage modules,
#   global configuration fragments, or virtual host configurations,
#   respectively.
#
#   They are activated by symlinking available configuration files from their
#   respective *-available/ counterparts. These should be managed by using our
#   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
#   their respective man pages for detailed information.
#
# * The binary is called apache2. Due to the use of environment variables, in
#   the default configuration, apache2 needs to be started/stopped with
#   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
#   work with the default configuration.


# Global configuration
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the Mutex documentation (available
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
Mutex file:${APACHE_LOCK_DIR} default

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5


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

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog /var/www/html/error.log

#
# LogLevel: Control the severity of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn

# 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 All
   # 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>
<Directory "/var/www/html">
Allowoverride All
</Directory>



# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
    Require all denied
</FilesMatch>


#
# 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

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Include /etc/phpmyadmin/apache.conf
<VirtualHost *.80>
    DocumentRoot "/var/www/html/"
    ServerName carloh.ml
</VirtualHost>
LoadModule rewrite_module modules/mod_rewrite.so
<IfModule mod_suphp.c>
suPHP_UserGroup root root
</IfModule>