AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[wordpress](ubuntu)

Martin Hope
user289455
Asked: 2020-04-05 15:32:56 +0800 CST

如何在 docker 容器中编辑 php.ini?

  • 4

所以我正在运行 wordpress docker 容器,我想增加在 php.ini 中设置的上传文件大小限制。我的问题是我在任何地方都找不到该文件。

我使用 docker-compose 文件安装了容器。

php container wordpress docker 18.04
  • 2 个回答
  • 31711 Views
Martin Hope
newcat1000
Asked: 2020-03-17 10:30:10 +0800 CST

Wordpress 无法识别来自 repos 的带有 PHP 7.4.3 的 Ubuntu 18.04 droplet 上的 PHP 更新

  • 0

Wordpress 无法识别来自 repos 的 Ubuntu 18.04 droplet 和 PHP 7.4.3 上的 PHP 更新。

它说我有 PHP 版本 7。

如何让 WP 接受更新?

我的 .htaccess 中有这个

# END WordPress
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value memory_limit 400M
php_value max_execution_time 180
php_value max_input_time 180


# Wordfence WAF
<IfModule mod_php7.c>
    php_value auto_prepend_file '/var/www/html/wordfence-waf.php'
</IfModule>
<Files ".user.ini">
<IfModule mod_authz_core.c>
    Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
</IfModule>
</Files>

# END Wordfence WAF

WP_DEBUG true 没有错误

root@benja2:~# a2enmod php7.4
Considering dependency mpm_prefork for php7.4:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php7.4:
Enabling module php7.4.
To activate the new configuration, you need to run:
systemctl restart apache2
root@benja2:~# systemctl restart apache2
root@benja2:~#

我的 wordfence-waf.php 中有这个

<?php
// Before removing this file, please verify the PHP ini setting        `auto_prepend_file` does not point to this.

if (file_exists('/var/www/html/wp-content/plugins/wordfence    /waf/bootstrap.php')) {
    define("WFWAF_LOG_PATH", '/var/www/html/wp-content/wflogs/');
    include_once '/var/www/html/wp-content/plugins/wordfence    /waf/bootstrap.php';
}
?>

谢谢

php wordpress
  • 1 个回答
  • 373 Views
Martin Hope
Irfan Habib
Asked: 2020-01-01 05:14:38 +0800 CST

重新安装 apache2 后无法访问我的域

  • 0

我在我的 Ubuntu/var/www/html目录中安装了 3 个 WordPress。过去两年没有任何问题。但是最近当我在同一目录中安装另一个脚本时,我不得不清除并重新安装 apache2.

之后,我无法访问我的所有网站。它说“无法连接”

当我输入 IP 地址时,它显示的是 Apache 服务器主页,而不是之前显示的 3 个目录页面。

我试图重新启动 Apache 服务器并且它运行良好,但仍然没有结果。

  • www.misources.com
  • www.trackerplanet.com
  • www.mypan.co.in
server permissions apache2 wordpress
  • 1 个回答
  • 407 Views
Martin Hope
frostergale
Asked: 2019-07-23 07:19:06 +0800 CST

http://localhost/test.php 和博客不工作

  • 0

当我尝试访问 localhost/blog 时,
它说我无权访问此服务器上的 /blog/ 并且 403 被禁止。
我已经尝试了几个小时,找不到任何问题。
我尝试了很多解决方案,但似乎都不适用于我的
DocumentRoot /var/www/html/p1929018
ubuntu 18.04 版本
我尝试添加更改 000-default.conf 文件但仍然保持不变
我不确定我得到了哪一部分丢失。
我的 000-default.conf

<VirtualHost *:80>
    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    #ServerName www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/p1929018
    <Directory /var/www/html/p1929018>
  Require all granted
</Directory>

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf

我的 apache.conf

# 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

#
# The directory where shm and other runtime files will be stored.
#

DefaultRuntimeDir ${APACHE_RUN_DIR}

#
# 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 ${APACHE_LOG_DIR}/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 None
    Require all denied
</Directory>

<Directory /usr/share>
    AllowOverride None
    Require all granted
</Directory>

<Directory /var/www/html/p1929018>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

#<Directory /srv/>
#   Options Indexes FollowSymLinks
#   AllowOverride None
#   Require all granted
#</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 granted
</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

我的错误日志

我可能遗漏了一些细节
当我无法在 Firefox 上打开 wordpress 页面时会出现问题,那么我该如何解决这个问题?
所有帮助将不胜感激

lamp wordpress
  • 1 个回答
  • 685 Views
Martin Hope
Brajmohan Kumar
Asked: 2019-05-26 03:12:37 +0800 CST

如何安全地将 PHP 7.2 更新/升级到最新版本?

  • 31

我在 DigitalOcean 上的 Ubuntu 18.04 上通过 LEMP 堆栈服务器运行 WordPress 网站。WordPress 建议我将我的 PHP 更新到最新版本。

我正在运行 PHP 7.2.17;请告诉我将我的 PHP 更新到最新版本 PHP 7.3 的最安全方法。

php wordpress 18.04 php7
  • 2 个回答
  • 52636 Views
Martin Hope
Kishore
Asked: 2018-10-28 03:42:24 +0800 CST

Apache/2.4.29 (Ubuntu) 服务器在 443 端口用于 wordpress

  • 2

Let's encrypt certificate在 Ubuntu 18.04 上的 AWS 中安装后,我在 Wordpress 中遇到错误。

单击此处查看错误消息图像

如何解决这个问题?

apache2 aws wordpress openssl
  • 2 个回答
  • 18523 Views
Martin Hope
Dora
Asked: 2018-04-12 16:49:46 +0800 CST

设置 SFTP 以使用 Filezilla 登录服务器并访问我的主目录之外的文件

  • 2

我在 AWS 上有一个 ec2 实例,其中已经安装了一些 Wordpress-es。我想设置一些东西,让更多人处理他们自己的项目,如果我仍然想的话,我也可以使用终端进入服务器。

我一直在关注 如何在 Ubuntu 上设置受限 SFTP 服务器?和其他一些人。我想他们都只是教用户如何sftp进入他们自己的主文件夹,这些步骤也一直在说addUser,但一些用户已经存在,删除它们可能会导致一些问题。

如何授予现有用户将 SFTP 用于 Wordpress 项目的权限?

假设我所有的 Wordpress 项目都已经在/var/www/其中设置了www-data:www-data.

设置这样的东西真的很新。

提前感谢您的帮助。

server command-line permissions sftp wordpress
  • 1 个回答
  • 2689 Views
Martin Hope
user423047
Asked: 2018-03-18 12:54:49 +0800 CST

配置 sSMTP 后无法从 WordPress 发送邮件

  • 0

这是我/etc/ssmtp/ssmtp.conf的,省略了 root、电子邮件、密码和主机名:

[email protected]
[email protected]
AuthPass=my_gmail_password
hostname=my_host_name

mailhub=smtp.gmail.com:587
rewriteDomain=gmail.com
FromLineOverride=YES
UseTLS=YES
UseSTARTTLS=YES

文件权限为rw-r-----.


虽然我保存了这个 conf,但我仍然在 WordPress 中遇到错误(通过Contact Form 7 插件,或简称 CF7)。

没有创建/var/log/mail.log或/var/log/ssmtp.log创建任何具有相似名称的日志文件(我知道我可以创建这些文件,touch并假设如果我觉得确实需要它,我会这样做)。

server email wordpress ssmtp cms
  • 1 个回答
  • 447 Views
Martin Hope
user423047
Asked: 2018-03-15 09:04:59 +0800 CST

如何配置 sSMTP 以将电子邮件发送到多个电子邮件地址?

  • 1

我将 Ubuntu 16.04 与 Bash、Nginx 和sSMTP. 在这个环境中,我有 2 个或更多 WordPress 应用程序。

的基本配置sSMTP允许它将 WordPress 联系表单电子邮件从一个应用程序路由到我的个人电子邮件帐户 (Gmail)。

sudo cat /etc/ssmtp/ssmtp.conf:

[email protected]
mailhub=smtp.gmail.com:587
UseTLS=YES
UseSTARTTLS=YES

[email protected]
AuthPass=___MY_GMAIL_PASSWORD___

rewriteDomain=gmail.com
hostname=alien
FromLineOverride=YES

我的问题

如果我有 2 个或更多应用程序,sSMTP当 Ubuntu 用户有 2 个或更多应用程序时应该如何重建 conf?

更新

在您的回答中,还请参考安全问题。将我的个人 Gmail 密码暴露在配置文件中似乎是一种安全风险,而不是我想做的事情。另一方面,我不想创建第二个 Gmail 帐户,或者我必须并且应该闭嘴并这样做?...

email gmail postfix nginx wordpress
  • 1 个回答
  • 2412 Views
Martin Hope
user423047
Asked: 2018-03-10 07:19:40 +0800 CST

Postfix 不会将 WordPress 联系表格电子邮件转移到我的 Gmail 帐户

  • 5

在 DigitalOcean 中带有 LEMP 的 Ubuntu 16.04 VPS 中,我有一个 WordPress 网站,其中有一个我使用联系表 7 (CF7) 创建的联系表。

我的问题

我在将电子邮件从我的 WordPress 联系表 (CF7) 传输到我的电子邮件 (Gmail) 时遇到问题。

我必须说,我会谦虚地更喜欢非插件解决方案。

我机器的 DNS 区域

  1. A记录持有该域。
  2. Cname记录持有www.域的变体。
  3. NS将 DNS 请求与我的域、我的 IP 和其机器中的相关应用程序相关联的三个记录。

我确实尝试MX通过自动 DigitalOcean 方式添加记录(通过单击Add Gmail MX recordsDigitalOcean DNS 管理工具中的按钮),并MX添加了 5 条记录,但在我立即尝试从 WordPress 发送测试电子邮件后仍然遇到同样的错误(见下面的错误)。

目前,DNS 区域没有MX记录,因为如果我在电子邮件上下文中想要的只是将 WordPress 联系表查询发送到我的 Gmail 帐户并且我仍然处于与同样的错误。

确切的错误和调试尝试:

我总是在联系表下方的红色框中收到以下错误消息:

无法发送您的消息。

由于这个错误,没有任何东西被发送到任何地方(甚至没有发送到垃圾邮件文件夹)。

为了调试这个,我运行了以下代码来为 Postfix 创建一个日志:

touch /var/log/mail.log
  • Nginx 日志中没有错误。

权限是:

rw-r--r-- 1 root root

但是,在我尝试向自己发送一封测试电子邮件但失败后,此错误日志中没有任何内容。

重现我的问题:

  1. 创建一个 DigitalOcean Ubuntu 16.04 droplet。
  2. 创建一个 LEMP 堆栈并在其上运行一个 WordPress 网站。
  3. sudo apt-get update && sudo apt-get upgrade postfix.
  4. 选择“互联网站点”配置。
  5. 键入您使用的站点的域。
  6. 在您的 WordPress 网站上安装 Contact Form 7 并尝试给自己发送一封测试电子邮件。

我的问题

是什么导致了这个问题?

也许我可以尝试使用 Postfix 或我应该使用的替代工具,如sSMTP?我更喜欢最小到无配置的工具。我强调,除了那些登陆 WordPress 联系表的邮件外,我不会向我的 Gmail 发送任何其他电子邮件,我也不会从这台机器在任何地方发送任何其他电子邮件。

过去,我如上所述安装了 Postfix,没有任何问题。如果您知道要检查什么,我应该提供哪些详细信息,请告诉我,我会进行编辑。


更新

1)文件/etc/postfix/main.cf全部默认。

2)输出ps -efl | grep postfix:

5 S root      4611     1  0  80   0 - 16352 ep_pol 07:42 ?        00:00:00 /usr/lib/postfix/sbin/master -w
4 S postfix   4613  4611  0  80   0 - 16881 ep_pol 07:42 ?        00:00:00 qmgr -l -t unix -u
4 S postfix   4930  4611  0  80   0 - 16869 ep_pol 11:02 ?        00:00:00 pickup -l -t unix -u -c
0 S root      5201  5187  0  80   0 -  3236 pipe_w 12:19 pts/0    00:00:00 grep --color=auto postfix
configuration vps email postfix wordpress
  • 2 个回答
  • 1625 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve