谁能告诉我怎么做,或者给我指点一个关于如何在使用 Apache2 时让 iRedMail 工作的工作教程?
安装成功,我现在需要的只是 Web 界面。我们不能使用 Nginx,因为该服务器上托管着很多网站,所以我们必须坚持使用 Apache。
我希望有人能告诉我如何让 Web 界面与 Apache 一起工作。
不幸的是,我已经用谷歌搜索了两天了,但没有找到有效的解决方案。
我安装它的 URL 应该是 webmail.mydomain.com
此致
我目前正在 Ubuntu Apache Web 服务器上使用 SignalR 运行 .Net Core 应用程序。此 .Net Core 应用程序可通过 example.com/api 路径访问。
我还在网络服务器上运行了一个 Vue JS 应用程序。当我尝试建立与 SignalR 应用程序的 websocket 连接时,出现以下错误:
与“wss://example.com/api/mainHub?id=V3XZrhdsQDTTMIZvQ-8cbQ”的 WebSocket 连接失败:WebSocket 握手期间出错:意外响应代码:200
错误:无法启动传输“WebSockets”:null
.Net Core 应用程序的 Apache 配置如下:
#Main/Desired Path - https://example.com
<VirtualHost *:443>
DocumentRoot /var/www/example.com/dist/spa
ServerName example.com
#SSL Certs
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:!RC4+RSA:+HIGH:+MEDIUM:!LOW:!RC4
SSLCertificateFile /etc/apache2/ssl/example.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
SSLCertificateChainFile /etc/apache2/ssl/example.ca-bundle
#Upgrade Websockets
RewriteEngine on
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
RewriteRule /(.*) ws://localhost:5000/$1 [P]
#Other specific directories
ProxyPreserveHost On
ProxyPass …Run Code Online (Sandbox Code Playgroud) apache2 signalr kestrel kestrel-http-server asp.net-core-signalr
我在终端执行命令:后sudo systemctl restart apache2,提示错误:
Job for apache2.service failed because the control process exited with error code.\nSee "systemctl status apache2.service" and "journalctl -xeu apache2.service" for details.\nRun Code Online (Sandbox Code Playgroud)\n按照上面的提示执行systemctl status apache2.service命令后,收到这样的提示:
\xc3\x97 apache2.service - The Apache HTTP Server\n Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor prese>\n Active: failed (Result: exit-code) since Mon 2021-12-20 09:50:13 +06; 9min>\n Docs: https://httpd.apache.org/docs/2.4/\n Process: 14920 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/F>\n CPU: 18ms\n\xd0\x96\xd0\xb5\xd0\xbb 20 09:50:13 RTT apachectl[14923]: [Mon Dec 20 09:50:13.739503 2021] [alias:>\n\xd0\x96\xd0\xb5\xd0\xbb 20 09:50:13 …Run Code Online (Sandbox Code Playgroud) [求助:见下面的解决方案.]
我在编写RewriteMap程序时遇到问题(使用Python).我有一个RewriteMap指向Python脚本的指令,该脚本确定所请求的URL是否需要重定向到其他位置.
当脚本输出由换行符终止的字符串时,Apache会相应地重定向.但是,当脚本输出NULL(没有换行符)时,Apache挂起并且后续HTTP请求被有效忽略.
错误日志显示没有错误.重写日志只显示pass through后跟一个redirect成功时,则只有pass through当NULL由脚本返回.后续请求也只显示pass through.
此外,更换stdout与os.fdopen(sys.stdout.fileno(), 'w', 0)对缓冲区长度设置为零没有帮助.
任何帮助将不胜感激.先感谢您.
[...]
RewriteLock /tmp/apache_rewrite.lock
Run Code Online (Sandbox Code Playgroud)
<VirtualHost *:80>
[...]
RewriteEngine on
RewriteLogLevel 1
RewriteLog /var/www/logs/rewrite.log
RewriteMap remap prg:/var/www/remap.py
[...]
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*_.*) /${remap:$1} [R=301]
Run Code Online (Sandbox Code Playgroud)
#!/usr/bin/python
import sys
def getRedirect(str):
new_url = None
# if url needs to be redirected, put this value …Run Code Online (Sandbox Code Playgroud) 我有一个长期运行的CGI和超时错误的问题:
超时等待CGI脚本的输出
客户端是jQuery编程的表单.用户输入一些数据并接收分析已启动的消息.除了在分析数据时带有链接的电子邮件之外,用户不希望看到更多消息.那么,此时,与客户端的连接已关闭,对吧?
在服务器端,Perl CGI脚本获取数据并执行一些C程序(使用Perl的系统)来分析它们.此过程可能需要几秒钟到几小时,具体取决于输入的数据.
然后,相同的CGI程序解析结果并向用户发送一封电子邮件,其中包含指向结果网页的链接.
因为对于某些数据,CGI可以运行几个小时我收到错误消息.
我假设增加ScriptTimeout是一个坏主意.我甚至不确定mod_cgi是否已安装.
我该怎么做才能避免这个错误?
服务器:在Mac OS X中运行的Apache2.
我有一点问题,我有一个像这样开始的php文件:
<?php
ini_set("display_errors", true);
echo "test";
exit();
Run Code Online (Sandbox Code Playgroud)
不知怎的,这会返回一个空页?!
我用ubuntu 10.10,gvim和apache2
这可能与utf-8格式化有关吗?我刚刚切换到ubuntu,gvim所以我不确定我是否使用utf-8,但我知道它已经导致这个问题.
编辑:
当我将文件更改为
<?php
test
Run Code Online (Sandbox Code Playgroud)
没有任何显示,但如果我将其更改为:
test
<?php
Run Code Online (Sandbox Code Playgroud)
测试出现了?!
我正在尝试在我的虚拟主机上设置django并且遇到了这个错误:
MOD_PYTHON ERROR
ProcessId: 4496
Interpreter: 'ouiop'
ServerName: 'ouiop.com'
DocumentRoot: '/var/www/vhosts/ouiop.com/httpdocs'
URI: '/'
Location: '/'
Directory: None
Filename: '/var/www/vhosts/ouiop.com/httpdocs/'
PathInfo: ''
Phase: 'PythonHandler'
Handler: 'django.core.handlers.modpython'
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1202, in _process_target
module = import_module(module_name, path=path)
File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 304, in import_module
return __import__(module_name, {}, {}, ['*'])
ImportError: No module named modpython
Run Code Online (Sandbox Code Playgroud)
我在网上做了一些研究,看看是否有人有同样的问题,但没有运气解决它:/
这也是我的vhosts.conf
<Location "/">
SetHandler python-program
PythonPath "['/var/www/vhosts/ouiop.com/httpdocs/django_projects'] + sys.path"
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE ouiop.settings …Run Code Online (Sandbox Code Playgroud) 我正在使用Bitnami Tomcat堆栈上的Java servlet 实现JSON补丁规范.在servlet端,我通过重写HttpServlet.service()方法来处理HTTP PATCH方法,如下所示:
@Override
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
if (request.getMethod().equals("PATCH"))
doPatch(request, response);
else
super.service(request, response);
}
Run Code Online (Sandbox Code Playgroud)
问题是,当我尝试向Tomcat发送HTTP PATCH请求时,Apache httpd使用501"Method Not Implemented"拒绝它.
有没有办法让Apache httpd停止这样做?
我在Ubuntu 12.04服务器上运行Apache(版本2.2.22)Web服务器.SSI不起作用.经典<!--#echo var="DATE_LOCAL" -->在index.shtml页面不会被解释.在/etc/apache2/httpd.conf我放了:
Options +Includes
AddType text/html .shtml
AddHandler server-parsed .shtml
AddOutputFilter INCLUDES .shtml
Run Code Online (Sandbox Code Playgroud)
在/ etc/apache2/sites-available/default中:
DocumentRoot /var/www
<Directory />
Options Indexes FollowSymLinks MultiViews +ExecCGI +Includes
AllowOverride All
AddHandler cgi-script .cgi .pl .py
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
<IfModule mod_dir.c>
DirectoryIndex index.shtml index.html index.php
</IfModule>
Run Code Online (Sandbox Code Playgroud)
而且,error.log给了我:
[Wed May 07 13:51:23 2014] …Run Code Online (Sandbox Code Playgroud) 我有一个泊坞窗,RESTARTING如果entrypoint.sh运行,它将永远处于状态。
检查中docker logs,我看到了这2个错误块的许多重复:
e is 65537 (0x010001)
140680312165760:error:28069065:UI routines:UI_set_result:result too small:../crypto/ui/ui_lib.c:765:You must type in 4 to 1023 characters
140680312165760:error:28069065:UI routines:UI_set_result:result too small:../crypto/ui/ui_lib.c:765:You must type in 4 to 1023 characters
140680312165760:error:0906906F:PEM routines:PEM_ASN1_write_bio:read key:../crypto/pem/pem_lib.c:330:
Generating RSA private key, 2048 bit long modulus
Run Code Online (Sandbox Code Playgroud)
和
e is 65537 (0x010001)
unable to load Private Key
139751600240000:error:28069065:UI routines:UI_set_result:result too small:../crypto/ui/ui_lib.c:765:You must type in 4 to 1023 characters
139751600240000:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:../crypto/evp/evp_enc.c:536:
139751600240000:error:0906A065:PEM routines:PEM_do_header:bad decrypt:../crypto/pem/pem_lib.c:439:
Generating RSA private key, 2048 bit …Run Code Online (Sandbox Code Playgroud)