简体   繁体   English

Jelastic Wordpress网站安装在子目录和设置中,不适用于根域

[英]Jelastic Wordpress site installed in subdirectory and set does not work for the root domain

I want to have a WordPress site directly in the domain of access. 我想直接在访问域中拥有一个WordPress网站。 without the WP files are actually in the main folder. 没有WP文件的文件实际上位于主文件夹中。

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. 例如:我将WordPress安装在/ blog文件夹(example.com/blog)中,并且我可以配置为直接在域(example.com)中进行访问,而不包括文件夹名称。 (in this case the /blog folder). (在本例中为/ blog文件夹)。

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: 根据简单的说明,我可以在Macbook air的开发环境中轻松运行此命令:

However, in doing so created the environment in Jelastic , this is not working. 但是,这样做在Jelastic中创建了环境,这是行不通的。

Someone could do this on Jelastic ? 有人可以在Jelastic上这样做吗? Place the wordpress installation in a folder and then configured to access the root domain by Jelastic ? 将wordpress安装放在一个文件夹中,然后配置为通过Jelastic访问根域?


My Additional Information: 我的附加信息:

I'm using a trial account to test Jelastic . 我正在使用试用帐户测试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; 环境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; 环境2:Apache 2.2 + MariaDB 5.5;

Jelastic only works in root for me with Apache Server. Jelastic仅对Apache服务器具有root权限。 With NGINX Server (not like loadbalancer) impossible the install wordpress. 使用NGINX Server(与负载平衡器不同)无法安装wordpress。

Jelastic only works in root for me with Apache Server. Jelastic仅对Apache服务器具有root权限。 With NGINX Server (not like loadbalancer) impossible the install wordpress. 使用NGINX Server(与负载平衡器不同)无法安装wordpress。

While installing WP to Nginx I have faced with some problems too and found solution. 在将WP安装到Nginx时,我也遇到了一些问题并找到了解决方案。

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: 我已经将WP部署到上下文/ blog,然后在浏览器中打开,并且在单击“ 创建配置文件”后没有任何反应,但是我在地址栏中收到了如下链接:

http://example.com/blog/index.php/blog/wp-admin/setup-config.php 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 要继续安装,您需要删除blog / index.php之一

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

Then I have successfully installed WP. 然后,我已经成功安装了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: 如果您想直接在访问域中拥有WordPress网站而WP文件实际上不在Nginx Server的主文件夹中,则需要:

Install WP to needed context example.com/blog 将WP安装到所需的上下文example.com/blog

Change Site Address (URL) in WP to example.com/ 将WP中的站点地址(URL)更改为example.com/

Then find in Nginx Config Manager conf > nginx.conf at 41 line such text and change directory ROOT to blog : 然后在Nginx Config Manager的conf > nginx.conf中找到第41行这样的文本,并将目录ROOT更改为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. 保存文件并重新启动Nginx。

To have a WordPress site directly in the domain of access without the WP files are actually in the main folder you need: 要直接在访问域中拥有WordPress网站而没有WP文件,实际上需要在主文件夹中:

Install WP to needed context example.com/blog 将WP安装到所需的上下文example.com/blog

Change Site Address (URL) in WP to example.com/ 将WP中的站点地址(URL)更改为example.com/

Then find in Apache Config Manager conf > httpd.conf at 960 line such text: 然后在960行的Apache Config Manager conf > httpd.conf中找到这样的文本:

<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 DocumentRoot / var / www / webroot / ROOT更改为DocumentRoot / var / www / webroot / blog

Save the file and restart Apache. 保存文件并重新启动Apache。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在子目录中安装pyrocms,在根目录中安装wordpress - pyrocms installation in a subdirectory with wordpress installed in the root directory htaccess问题,在根目录和子目录中安装了多个wordpress - htaccess issue with multiple wordpress installed in root and subdirectory Wordpress已经安装在根目录中,我也已经在子目录中安装了Wordpress,但是问题是子目录URL无法正常工作 - Wordpress already Installed in root Directory and I have also installed wordpress in subdirectory, But the problem is subdirectory URL is not working conteiner中的Wordpress网站不会重定向到子目录 - Wordpress site in conteiner does't redirect to subdirectory 在子目录上安装了wordpress,想要将帖子导入到根目录(主页) - Have wordpress installed on a subdirectory, want to import posts to root (homepage) .htaccess配置,将wordpress网站的主页设置到子目录,将其他页面设置到根目录 - .htaccess configuration for homepage of wordpress site to a subdirectory and other pages to root directory 将Wordpress迁移到带有子目录的网站 - Migrating Wordpress to a site with a subdirectory 检测脚本是否在域根目录或子目录中 - Detect if script in Domain Root or Subdirectory 如果root不是wordpress安装,则子目录中的wordpress - Wordpress in subdirectory when root is not a wordpress installation 网站将在子目录中工作,但不在根目录中 - Website will work in subdirectory but not root directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM