简体   繁体   English

apache和rails可以在同一服务器上的不同目录中运行吗?

[英]can apache and rails run on the same server in different directories?

is there any special configuration that needs to occur to make this happen? 是否需要进行任何特殊配置才能实现此目的?

currently my setup is such that the folder rails/wiki , where I installed all my rails stuff and all the config files live, it is a subdirectory of /var/www/html , is that alright? 目前,我的安装程序是文件夹rails/wiki ,我在其中安装了所有rails东西和所有配置文件,它是/var/www/html的子目录,可以吗?

instead of the server landing page, it's just the folder structure: 而不是服务器登录页面,它只是文件夹结构:

http://btwnthelin.es/rails/wiki/ . http://btwnthelin.es/rails/wiki/

The main component /var/www/html has my apache stuff: 主要组件/var/www/html有我的Apache资料:

http://btwnthelin.es/ http://btwnthelin.es/

and that works fine. 而且效果很好。

The server is running on port 3000, I thought I could access it by http://btwnthelin.es:3000 but that results in a 404 error. 服务器在端口3000上运行,我以为我可以通过http://btwnthelin.es:3000访问它,但这会导致404错误。


development.log development.log

[1m[36m (3.3ms)[0m  [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
[1m[35m (0.2ms)[0m  select sqlite_version(*)
[1m[36m (2.3ms)[0m  [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m  SELECT "schema_migrations".* FROM "schema_migrations"
Migrating to CreateArticles (20150511093446)
[1m[36m (0.1ms)[0m  [1mbegin transaction[0m
[1m[35m (0.6ms)[0m  CREATE TABLE "articles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar, "content" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
[1m[36mSQL (0.2ms)[0m  [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m  [["version", "20150511093446"]]
[1m[35m (2.5ms)[0m  commit transaction
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m  [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m  [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m  SELECT "schema_migrations".* FROM "schema_migrations"

在您的/etc/hosts文本文件中添加此内容,

127.0.0.1 btwnthelin.es

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM