Meu domínio encaminha para www.www.domain.com

0

Em ubuntu server 16.04 , tenho um site wordpress e quero vinculá-lo a um nome de domínio.

Eu configurei os registros de DNS em vutlr e, em seguida, configurei também os Hosts virtuais no meu servidor

No entanto, quando digito www.meudominio.com, estou encaminhando para www.www.mydomain.com

Por que isso está acontecendo?

O host virtual é:

<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  [email protected]
        ServerName mydomain.com
        ServerAlias www.mydomain.com
        DocumentRoot /var/www/html/mysite

        # 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}/mysite-error.log
        CustomLog ${APACHE_LOG_DIR}/mysite-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

</VirtualHost>

meu 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', 'mydbsite');

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

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

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

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

/** 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',         ',<sssssssssssssssssssssssssssssssssssss');
define('SECURE_AUTH_KEY',  'sssssssssssssssssssssssssssssssssssss');
define('LOGGED_IN_KEY',    'Jssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss ');
define('NONCE_KEY',        ':sssssssssssssssssssssssssssssssssssssssssssssssssssssssss');
define('AUTH_SALT',        'sssssssssssssssssssssssssssssssssssssssssssssssssssssssss');
define('SECURE_AUTH_SALT', 'sssssssssssssssssssssssssssssssssssssssssssssssssssssssss');
define('LOGGED_IN_SALT',   'sssssssssssssssssssssssssssssssssssssssssssssssssssssssss');
define('NONCE_SALT',       'sssssssssssssssssssssssssssssssssssssssssssssssssssssssss');

/**#@-*/

/**
 * 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.



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');

Existe também um arquivo htcaccess dentro da pasta da wordpess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /mysite/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /mysite/index.php [L]
</IfModule>

# END WordPress

Além disso, o log de erros do apache2

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitIn$

Finalmente as configurações nos registros DNS em vultr

ATUALIZAÇÃO: Agora eu sou redirecionado para www.www.mydomain.com ...

    
por yaylitzis 26.01.2018 / 21:39

1 resposta

0

Eu desperdicei mais de 3 horas, tentando entender por que um procedimento simples (eu fiz isso muitas vezes) não estava funcionando ...

No entanto, a solução foi muito simples ...

  1. Alterei a página inicial e o site em Configurações - Geral para ter o nome do domínio.
  2. Então limpei o cache no meu navegador e tudo funcionou

...

    
por yaylitzis 27.01.2018 / 00:18