
[英]I have two errors because of Django or Apache
当我尝试向http://localhost/upload-avatar/发送 POST 请求时,出现了两个错误未找到错误404) SyntaxError: 意外的标记 '<', "<.DOCTYPE "... 不是有效的 JSON。 我想了解是什么原因以及如何解决这个问题。 怀疑问题出 ...
[英]I have two errors because of Django or Apache
当我尝试向http://localhost/upload-avatar/发送 POST 请求时,出现了两个错误未找到错误404) SyntaxError: 意外的标记 '<', "<.DOCTYPE "... 不是有效的 JSON。 我想了解是什么原因以及如何解决这个问题。 怀疑问题出 ...
[英]How to stop 30s timeouts in MAMP?
我正在运行 WordPress 代码(导入 25 个帖子),该代码在 30 秒后触发 500 服务器错误(通过 ajax 报告),但该过程在后台的服务器上继续进行。 对于我的一生,我找不到任何 30 秒设置的证据...... php7.4.33.ini... apache_error.log ...
[英]mod_wsgi on Python 3.10 does not update Django templates without Apache restart
我已经使用 Apache 和 mod_wsgi 在 Python 3.8 上运行 Django 服务器一段时间了,我决定是时候升级到 Python 3.10 了。 我在我的服务器上安装了 Python 3.10,安装了 Django 和 mod_wsgi 包,将 mod_wsgi.so 的 3.10 ...
[英]Mailer Error: SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: Relaying disallowed as tr_xxxx@gmail.com SMTP code: 553
通过 phpmailer 发送错误:邮件错误:SMTP 错误:数据未被接受。 SMTP 服务器错误:DATA END 命令失败 详细信息:不允许中继为 tr_xxxx@gmail.com SMTP 代码:553 我需要在哪里检查或编辑才能发送邮件? 尝试启用/禁用 TFA 身份验证。 不起作用 ...
[英]How to configure nginx reverse proxy for apache with servername on different server
我有server1和 public IP, server2有本地 IP,我想使用 nginx 反向代理从server1 public IP 访问我在server2上由 apache 托管的应用程序。 这是我的配置。 Apache2 配置 Nginx 配置 使用该配置,我在访问 http://&l ...
[英].htaccess Rewriterule redirecting to a URL on the same domain
我正在尝试将用户重定向到特定的 URL。 我想创建 .htaccess 重写规则来完成这个。 我想要这些: 转移到: 我已经尝试了许多重写规则的变体来让它工作,如果我想让它重定向到不同的域,我就成功了。 例如,以下 (in.htaccss): 成功转移到(分别): 但我希望重定向到同一个域(exa ...
[英]Getting Nuxt error handling function with Apache
正如瑞典谚语所说,尝试学习 Nuxt,一些酒和一些水。 当我构建应用程序时,我在错误处理方面遇到了一些问题(在开发中没有问题)。 看起来它不能与 Apache 及其 .htaccess 文件一起使用。 这是我的.htaccess: 基本错误处理 function(站点根目录中的 error.vue ...
[英].htaccess Redirect Rule for & Character
我对 .htaccess 文件没有经验。 我提前为误解道歉。 如果在我的 .htaccess 文件中有以下规则来接受没有文件扩展名的请求: 像domain.com/index/2/jonathan这样的 URL 应该(内部)重定向到domain.com/index.php?id=2&term ...
[英]Redirect based on the beginning of the path
我正在构建一个 Laravel 项目。 该项目本身有一个结构完全不同的“遗留”版本。 它记录了一些用户正在尝试访问在新环境中找不到的文件。 为了快速“修复”,我们希望重定向路径 /media/22044/blablabla.pdf至/en/press 快速的解决方案是使用 但是我们希望/media/ ...
[英].htaccess redirect homepage only
我需要301重定向主页 到 但是我有一份时事通讯在提交后使用了这个 URL: 所以在基本的 301 重定向之后,时事通讯提交链接也重定向到https://example.com/category/news 如何避免? ...
[英]Why does this web-hosted python code result in a 500 internal error?
我正在尝试运行一个 python 脚本来与我网站上的 openai API 交互(我希望将完成嵌入到我拥有的 web 应用程序中)。 目前 - 我只是想让代码在没有除 .py 脚本之外的任何东西的情况下运行。 我在托管(apache 服务器)网站的一个名为 script.py 的文件中有此代码。 ...
[英]Django project crashes server when admin backend is accessed
问题我在本地 ubuntu 服务器上运行 apache2。 我使用django-admin startproject site设置了一个 Django 项目,并设置了我的虚拟主机以使用 WSGI 守护进程运行 Django 项目。 这有效,并且可以通过其 IP 192.168.1.3访问该站点。 当 ...
[英]Page 403 Forbidden for root directory for Deny from all in .htaccess
我在根目录中有下一个.htaccess 并为www.example.com获取 Page 403 Forbidden 而不是www.example.com/index.php 。 URL www.example.com/index.php可用。 关闭对根目录中所有文件的访问。 这些文件由脚本生成 ...
[英]Finding User Agents and IPs which make more than 10 req/s in access logs
我想找到每秒发出超过 10 个服务器请求的 IP 个地址和用户代理。 请帮帮我。 我怎样才能做到这一点? 也许用 awk、grep? 这是我的访问日志中的典型行: 为了查找有关 UA 的信息,我正在运行这个:(给我每个独特 UA 的点击量) 我可以做些什么来使这些命令仅向我显示每秒超过 10 个请 ...
[英]Memory not freed after execution of a PHP script
我有一个 LAMP 服务器,我在其上运行 PHP 脚本,该脚本对包含大约 100 万行的表进行 SELECT 查询。 这是我的脚本(PHP 8.2 和 mariaDB 10.5.18):$db = new PDO("mysql:host=$dbhost;dbname=$dbname;", $dbus ...
[英]Laravel: Can't access app from different URLs (with also different ports and servers) at the same time
以前,我在这个问题中提出了 Laravel 问题: Laravel:当项目文件夹放置在默认 Apache 目录时,通过访问“http://localhost/<myapp>/public”启动应用程序时出现路由冲突在那里,我提到我有一个 Laravel 项目文件夹放置在默认的 Apac ...
[英]Laravel: Routing conflict when launching app by accesing "http://localhost/<myapp>/public", when project folder is placed in default Apache directory
按照此视频教程(西班牙语),我开始使用 Laravel 框架构建应用程序: https://www.youtube.com/watch?v=A-BL8Ir7puE&list=PLZ2ovOgdI-kWWS9aq8mfUDkJRfYib-SvF&index=2 我正在使用: Lin ...
[英]Php large file upload get empty array with code 7
我编写了一个页面来上传视频等文件,但我遇到了超过 2GB 的大文件的问题当我上传小于 2GB 的文件时,它工作正常,没有任何问题,但是当我尝试大文件时,我得到空数组,错误代码为 7 php 代码: HTML: .htaccess 档案: php 错误日志和 apache 日志中没有任何内容 ...
[英]How to redirect the page after rewrite the URL
我必须重写 URL 所以我在 my.htaccess 中使用了下面的代码,它正在工作 如果有人试图访问 url 链接exmple.com/products/part/pumps/那么它会显示pumps.php数据。 现在我的问题是,如果有人尝试访问页面 example.com/pumps.php 那 ...
[英]Deploying static website on Centos 7 using Apache
我在设置 home.html 主页时遇到问题。 当我使用选项在 httpd.conf 上设置虚拟主机时:-indexes,主页返回状态 403 和 index.html, 但是,我设置了选项:索引 FollowSymLinks、主页返回状态 200 和文件目录索引。 文件结构:/var/www/we ...