Pergunta

I want to have a WordPress site directly in the domain of access. without the WP files are actually in the main folder.

For example: I install WordPress in a /blog folder (example.com/blog), and I can configure to access is directly in the domain (example.com) without the folder name included. (in this case the /blog folder).

The advantage is that the main folder is more organized and existing scripts in other folders function normally and beyond to improve safety.

I have run this easily in my development environment on my macbook air, according to the simple instructions:

However, in doing so created the environment in Jelastic, this is not working.

Someone could do this on Jelastic? Place the wordpress installation in a folder and then configured to access the root domain by Jelastic?


My Additional Information:

I'm using a trial account to test Jelastic.

Environments created in which attempts were failures have been:

  1. Environment 1: NGINX 1.4.3 (loadbalacer) + Apache 2.2 + 5.5 + Memcached MariaDB 1.4.15;
  2. Environments 2: Apache 2.2 + MariaDB 5.5;

Jelastic only works in root for me with Apache Server. With NGINX Server (not like loadbalancer) impossible the install wordpress.

Foi útil?

Solução

Jelastic only works in root for me with Apache Server. With NGINX Server (not like loadbalancer) impossible the install wordpress.

While installing WP to Nginx I have faced with some problems too and found solution.

I have deployed WP to context /blog then opened in the browser and after I clicked on Create Configuration File nothing happened but I received the link in address line like:

http://example.com/blog/index.php/blog/wp-admin/setup-config.php

To continue the installation you need to remove one of the blog/index.php

Example: http://example.com/blog/wp-admin/setup-config.php

Then I have successfully installed WP.

If you want to have a WordPress site directly in the domain of access without the WP files are actually in the main folder with Nginx Server you need:

Install WP to needed context example.com/blog

Change Site Address (URL) in WP to example.com/

Then find in Nginx Config Manager conf> nginx.conf at 41 line such text and change directory ROOT to blog:

include /etc/nginx/aliases.conf;
    location / {
        root   /var/www/webroot/blog;
        index  index.html index.htm index.php;

        location ~ \.php$ {
            location ~ /\. { deny all; access_log off; log_not_found off; }
        include /etc/nginx/fastcgi_params;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_param SCRIPT_FILENAME /var/www/webroot/blog$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT /var/www/webroot/blog;

Save the file and restart Nginx.

Outras dicas

To have a WordPress site directly in the domain of access without the WP files are actually in the main folder you need:

Install WP to needed context example.com/blog

Change Site Address (URL) in WP to example.com/

Then find in Apache Config Manager conf> httpd.conf at 960 line such text:

<VirtualHost *:80>
ServerAdmin webmaster@domain.com
DocumentRoot /var/www/webroot/ROOT
ServerName website.jelastic.com
ServerAlias *
ErrorLog logs/dummy-host.jelastic.com-error_log
CustomLog logs/dummy-host.jelastic.com-access_log common
</VirtualHost>

Change DocumentRoot /var/www/webroot/ROOT to DocumentRoot /var/www/webroot/blog

Save the file and restart Apache.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top