HTTPD的问题。无法在文件夹上查看任何文件
我有一个使用HTTP创建的文件服务工具。它在没有任何问题的情况下工作。我最近升级到HTTPD服务。发布无法查看/打开任何文件的发布。
我的http.conf
ServerRoot "/etc/httpd"
Include conf.modules.d/*.conf
User apache
Group apache
<VirtualHost *:443>
SSLEngine on
SSLProtocol -ALL -SSLv3 +TLSv1.2
SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
SSLHonorCipherOrder on
SSLCompression off
SSLSessionTickets off
SSLCertificateFile /etc/pki/tls/certs/tool.crt
SSLCertificateKeyFile /etc/pki/tls/private/tool.key
SSLCertificateChainFile /etc/pki/tls/certs/tool.crt
Servername 10.x.x.x
</VirtualHost>
ServerAdmin root@localhost
DocumentRoot "/opt"
<Directory "/opt">
AllowOverride None
Require all granted
</Directory>
<Directory "/opt/tool">
Options Indexes FollowSymLinks
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule mime_module>
TypesConfig /etc/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
MIMEMagicFile conf/magic
</IfModule>
EnableSendfile on
IncludeOptional conf.d/*.conf
我的错误:
[Mon Apr 25 22:42:04.696565 2022] [mime_magic:error] [pid 16538] (13)Permission denied: [client 10.x.x.x:53639] AH01513: mod_mime_magic: read failed: /opt/Backup/2022/Apr/25/device.config
不确定如何解决此问题。
我的发现,
1。当文件允许751时,我能够看到但无法打开它会遇到一些错误。
错误
Forbidden
You don't have permission to access /tool/2022/Apr/25/device.config on this server.
2.当我使用.txt创建文件扩展程序时,可以看到但能够打开无法查看任何内容。下面
<!DOCTYPE HTML PUBLIC "-//IETF//DTD
不是来自开发人员背景。这里需要一些帮助。
I have a created file serving tool using http. it was working without any issue. I did recently upgraded to httpd services. post that not able view/open any files.
my http.conf
ServerRoot "/etc/httpd"
Include conf.modules.d/*.conf
User apache
Group apache
<VirtualHost *:443>
SSLEngine on
SSLProtocol -ALL -SSLv3 +TLSv1.2
SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
SSLHonorCipherOrder on
SSLCompression off
SSLSessionTickets off
SSLCertificateFile /etc/pki/tls/certs/tool.crt
SSLCertificateKeyFile /etc/pki/tls/private/tool.key
SSLCertificateChainFile /etc/pki/tls/certs/tool.crt
Servername 10.x.x.x
</VirtualHost>
ServerAdmin root@localhost
DocumentRoot "/opt"
<Directory "/opt">
AllowOverride None
Require all granted
</Directory>
<Directory "/opt/tool">
Options Indexes FollowSymLinks
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule mime_module>
TypesConfig /etc/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
MIMEMagicFile conf/magic
</IfModule>
EnableSendfile on
IncludeOptional conf.d/*.conf
my error:
[Mon Apr 25 22:42:04.696565 2022] [mime_magic:error] [pid 16538] (13)Permission denied: [client 10.x.x.x:53639] AH01513: mod_mime_magic: read failed: /opt/Backup/2022/Apr/25/device.config
not sure, how to fix this issue.
my finding,
1.when give permission 751 to files, i am able to see but unable to open it getting some error.
error
Forbidden
You don't have permission to access /tool/2022/Apr/25/device.config on this server.
2.when i create files extension with .txt able to see but able to open not able to see any content. getting below
<!DOCTYPE HTML PUBLIC "-//IETF//DTD
am not from dev background. need some help here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论