GNU/Linux >> Linux の 問題 >  >> Ubuntu

Httpエラー:Curlエラー7:WordPress.orgポート80への接続に失敗しましたか?

LEMPとwordpressを使用してUbuntuサーバー16.04を新たにインストールしました。
しかし、Webサイトで次のエラーが発生したため、プロセスのステップを逃したようです。

http error: curl error 7: failed to connect to wordpress.org port 80.

Webサイトを開発しているときに、仮想マシンで構成されていることを除けば、サイトは正常に機能しています。まず、ローカルマシンですべてをテストし、ローカルですべてをテストします。

これが私の設定ファイルです:

server {
        listen 80;
        server_name 192.168.1.3; #ipaddress;
        root /usr/share/nginx/mrupgrade.be/;
        index index.php index.html index.htm;

        error_page 404 /404.html;
        error_page 500 502 503 504 /50x.html;

        location = /50x.html    {
                root /usr/share/nginx/html;
        }
        location / {
                try_files $uri $uri/ /index.php;
        }

        error_page 404 /404.html;
        error_page 500 502 503 504 /50x.html;

        location ~ \.php$ {
                try_files $uri = 404;
                fastcgi_pass unix:/run/php/php7.0-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
                root /usr/share/nginx/mrupgrade.be/;
                }
        }

これらのルールを使用してファイアウォールを構成したことに注意してください。

よろしくお願いします。

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             state NEW tcp dpt:http
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED

wp-config.php

<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the
 * installation. You don't have to use the web site, you can
 * copy this file to "wp-config.php" and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * MySQL settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://codex.wordpress.org/Editing_wp-config.php
 *
 * @package WordPress
 */

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'mysite_wp_db');

/** MySQL database username */
define('DB_USER', 'mysite_user');

/** MySQL database password */
define('DB_PASSWORD', 'mysite');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
 *
 * @since 2.6.0
 */
define('AUTH_KEY',         'put your unique phrase here');
define('SECURE_AUTH_KEY',  'put your unique phrase here');
define('LOGGED_IN_KEY',    'put your unique phrase here');
define('NONCE_KEY',        'put your unique phrase here');
define('AUTH_SALT',        'put your unique phrase here');
define('SECURE_AUTH_SALT', 'put your unique phrase here');
define('LOGGED_IN_SALT',   'put your unique phrase here');
define('NONCE_SALT',       'put your unique phrase here');

/**#@-*/

/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each
 * a unique prefix. Only numbers, letters, and underscores please!
 */
$table_prefix  = 'wp_';

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 *
 * For information on other constants that can be used for debugging,
 * visit the Codex.
 *
 * @link https://codex.wordpress.org/Debugging_in_WordPress
 */
define('WP_DEBUG', false);

/* That's all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

/var/www/mrupgrade.be/public_htmlnginxサイト構成であるサイトの場所

user www-data;
worker_processes auto;
pid /run/nginx.pid;

events {
    worker_connections 768;
    # multi_accept on;
}

http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    # server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip on;
    gzip_disable "msie6";

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    # gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}

私の/etc/nginx/nginx.conf

#mail {
#   # See sample authentication script at:
#   # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
# 
#   # auth_http localhost/auth.php;
#   # pop3_capabilities "TOP" "USER";
#   # imap_capabilities "IMAP4rev1" "UIDPLUS";
# 
#   server {
#       listen     localhost:110;
#       protocol   pop3;
#       proxy      on;
#   }
# 
#   server {
#       listen     localhost:143;
#       protocol   imap;
#       proxy      on;
#   }
#}

したがって、イメージではすべてが正常であり、libが欠落しているか、fpmfastcgiをインストールしたかどうかわからない可能性があります。

関連:コマンドラインを使用してKDEアプリケーションランチャーメニューにアイテムを追加するにはどうすればよいですか?

ワードプレスはhttpリクエストでウェブに接続できません。

手がかりが何であるかはよくわかりません。

よろしくお願いします。

承認された回答:

あなたのサーバーはwordpress.orgと呼ばれていますか?

構成ファイルによると、次のようになります。

server_name 192.168.1.3; #ipaddress;

サーバー名をローカルで使用する場合は、ip-addressとnameを/ etc / hostsに入力する必要があります。外部からアクセスできる必要がある場合は、ISPによるホスト名とdns-entryが必要です。また、ルーターで適切なポート転送を設定する必要があります。


Ubuntu
  1. OpenStack VM起動エラー–最後の例外:ポートのバインドに失敗しました[解決済み]

  2. サポートされていないUbuntuリリースでapt-getFailedtoFetchエラーを修正する方法

  3. WordPressマルチサイトをインストールする

  1. Vivid – Upstartへの接続に失敗しました:接続が拒否されましたか?

  2. 起動時にVPNに接続しようとするとエラーが発生しますか?

  3. 0.0.0.0 のポート 22 へのバインドに失敗しました:アドレスは既に使用されています – sshd サービス CentOS/RHEL の開始中にエラーが発生しました

  1. USBモデムが接続しようとすると「ip-config-unavailable」エラーが発生しますか?

  2. 17.04から17.10へのアップグレードのリリースに失敗しましたか?

  3. Vlcプレーヤー– VdpauバックエンドLibvdpau_nvidia.soを開くことができませんでしたか?