Tag: 虚拟主机

允许子域指向计算机的Apache2配置:端口

我拥有域名“peterlee.com.cn”,我在我的域控制面板中添加了一个A Record: RR Destination IP TTL rs.peterlee.com.cn 10.50.10.75 1 hour 我有一个运行于10.50.10.75:9051的RoR(Ruby on Rails)项目,这意味着用户可以通过http://10.50.10.75:9051访问我的RoR应用程序 我想让用户通过http://rs.peterlee.com.cn访问它,所以我添加了以下VirtualHost文件/站点: ServerName rs.peterlee.com.cn DocumentRoot /usr/website/myapp/current/public PassengerEnabled off ProxyPass / http://127.0.0.1:9051/ ProxyPassReverse / http://127.0.0.1:9051/ RackEnv production RailsEnv production RewriteEngine On # Redirect all requests to the maintenance page if present RewriteCond %{REQUEST_URI} !\.(css|gif|jpg|png)$ RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /system/maintenance.html [L] […]