如果我有 apache 服务器提供的大文件下载,有没有办法在不中断正在进行的文件下载的情况下重新启动/重新加载 http 服务器(例如,使用新的 httpd.conf 更新)?或者至少为客户提供一种恢复下载的方法?
我可以在没有 httpd(没有 Web UI)的情况下安装 FreeIPA 服务器吗??
或者至少我可以更改端口?(80->8880 和 443->8443)
我的 CGI Perl 脚本 CentOS 7 运行不正确,它们要么显示为纯文本,要么出现服务器错误。
我一直把我的脚本放在默认/var/www/cgi-bin目录中,但没有运气。
我试图将 CGI 脚本放入其中,/var/www/html/another-dir但它们只是作为纯文本出现。
我一直在关注本教程:
$ sudo systemctl start nagios
Failed to start nagios.service: Unit nagios.service failed to load: No such file or directory.
Run Code Online (Sandbox Code Playgroud)
问题的原因是什么?
我有:
$ sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 8 services.
Checked 1 …Run Code Online (Sandbox Code Playgroud) 我一直试图让 Apache 将所有包含大写字符的 URL 重写为小写。由于某种原因,我发现的所有解决方案都不适用于我的情况。我希望这里有人可以帮助我找出原因。
我想要的是,如果有人点击我们页面上的一个 URL,那么http://example.com/products/productID/1234
他们就会被发送到
http://example.com/products/productid/1234
。注意 ID 是小写的。它并不总是只是ID我想要任何大写字符转换为小写。
基本上我访问的任何 URL 都不会改变,这让我相信它甚至没有试图重写它们。我也验证了rewrite_module未注释。
我在这里尝试了答案:Convert and redirect URL in largecase to lowercase using .htaccess
原始httpd.conf的摘录
<VirtualHost *:80>
ServerName dev.xxxxxxx.com
DirectoryIndex default.cfm index.cfm index.htm index.html
DocumentRoot "Z:/XXXXX"
ServerAdmin technical@xxxxxxxxx.com
Redirect 301 /xxxxxxxxx/photoFiles https://www.xxxxxxxxx.com/xxxxxxxx/photoFiles
ProxyPreserveHost On
# ProxyPassMatch .*\.(jpg|png|gif|css|js|ico|htm|txt|csv|html|pdf|doc|docx|xls|xlsx)$ !
# ProxyPass / balancer://nodes/ stickysession=JSESSIONID|jsessionid scolonpathdelim=on
ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ ajp://dev.xxxxxxxx.com:7009/$1$2
# ErrorDocument 404 /errors/404.cfm
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
更新(非工作)httpd.conf 的证书
<VirtualHost *:80>
ServerName dev.xxxxxxx.com
DirectoryIndex default.cfm index.cfm index.htm index.html …Run Code Online (Sandbox Code Playgroud) 运行红帽 7.4
直到最近我可以使用
semanage fcontext -a -t public_content_rw_t '/var/www(/.*)?'
restorecon -R /var/www
Run Code Online (Sandbox Code Playgroud)
来自回答https://serverfault.com/a/346779/125461 关于如何让 SELinux 允许 Apache 和 Samba 在同一文件夹中?.
但 public_content_rw_t 不再适用于 tomcat (tomcat-7.0.76-2.el7.noarch)
我设法通过使用解决了这个问题
semanage permissive -a tomcat_t
Run Code Online (Sandbox Code Playgroud)
但我正在寻找一个允许 tomcat & httpd 读取和 samba 读取和写入的上下文,或者一个允许 rw to tomcat、httpd & samba 的上下文。
或者,是否可以将 tomcat 使用的上下文更改为 httpd 上下文?
我在服务器上收到此错误(CentOs 7):
[proxy:debug] proxy_util.c(2209): [client 80.251.245.153:61902] AH00944: connecting fcgi://127.0.0.1/data/webs/dev/index.php to 127.0.0.1:8000
[proxy:debug] proxy_util.c(2246): [client 80.251.245.153:61902] AH02545: fcgi: has determined UDS as /tmp/php56-fpm.sock
[proxy:debug] proxy_util.c(2418): [client 80.251.245.153:61902] AH00947: connected /data/webs/dev/index.php to httpd-UDS:0
[proxy:error] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /tmp/php56-fpm.sock (*) failed
[proxy_fcgi:error] AH01079: failed to make connection to backend: httpd-UDS
[proxy:debug] proxy_util.c(2171): AH00943: FCGI: has released connection for (*)
Run Code Online (Sandbox Code Playgroud)
套接字存在,我尝试将权限更改为 777,但不起作用:
ls -l /tmp/php56-fpm.sock
-rw-rw----. 1 apache apache 0 Feb 17 16:11 …Run Code Online (Sandbox Code Playgroud) 我正在尝试创建一个反向代理,它匹配除 Apache 2.2 中的一个之外的每个 URL。它适用于 Apache 2.4 (Centos 7),但不适用于 Apache 2.2 (Centos 6.6) ...
# Do not modify this
<LocationMatch "^/my-website-2">
ProxyPass http://X.X.X.X:PORT/my-website-2
ProxyPassReverse http://X.X.X.X:PORT/my-website-2
(...)
</LocationMatch>
# Match every URL except the one finishing with /redirect
<LocationMatch "^/my-website(?!/redirect)">
ProxyPass http://X.X.X.X:PORT/my-website
ProxyPassReverse http://X.X.X.X:PORT/my-website
AuthType XXX
RequestHeader set XXX YYY
(...)
</LocationMatch>
# Do anothers directives with this URL only, finishing with /redirect
<Location "/my-website/redirect">
AuthType XXX
(...)
</Location>
Run Code Online (Sandbox Code Playgroud)
当我输入https://my-server.com/my-website因为正则表达式不匹配 ^/my-website时,我的服务器正在寻找 /var/www/html/my-website(不存在的)(?!/重定向)
我知道 Apache 2.2 不能理解每个负面 PCRE 正则表达式,但似乎存在一些技巧......请参阅:
我正在迁移到新服务器以升级我的内部结构,并且在启动我的 apache 和 PHP 时遇到了此错误
[Fri Apr 09 16:51:26.243820 2021] [proxy:error] [pid 31179:tid 140021109556992] (13)Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/www.sock (*) failed
[Fri Apr 09 16:51:26.243868 2021] [proxy_fcgi:error] [pid 31179:tid 140021109556992] [client 47.213.222.69:56165] AH01079: failed to make connection to backend: httpd-UDS
Run Code Online (Sandbox Code Playgroud)
该/run/php-fpm/www.sock文件确实存在,但它具有 root:root 权限。我的网络服务器在非默认用户下运行apache(用户是sites)
经过大量搜索后,我发现这篇文章PHP-FPM - Error 503 - Attempt to connect to Unix domain socket failed并发现该/run/php-fpm/www.sock文件需要被 chowed 给运行 httpd 的同一用户。于是我就这么做了$chown sites: /run/php-fpm/www.sock …
在 Apache Tomcat servlet 容器中运行的 Java Web 应用程序中,它前面有一个 Apache httpd:
在丢包、ping 延迟等方面,应用程序用于或多或少可靠的网络(比公共互联网好,但比 LAN 差一点)。该应用程序大量使用大型 dHTML、AJAX、静态和动态内容。长时间的用户会话(小时)。
httpd ×10
apache-2.2 ×3
apache-2.4 ×2
php-fpm ×2
centos ×1
centos7 ×1
cgi ×1
freeipa ×1
gzip ×1
http ×1
httpd.conf ×1
linux ×1
mod-rewrite ×1
pcre ×1
perl ×1
proxy ×1
selinux ×1
systemctl ×1
tomcat ×1
tomcat7 ×1