我有一个登陆页面和使用Passenger + Nginx的rails应用程序。 我想做这样的事情:
server {
listen 80;
server_name example.com;
if ( $remote_addr ~* ip-address-here ) {
root /home/app/public;
# Turn on Passenger
passenger_enabled on;
passenger_ruby /usr/local/rvm/gems/ruby-2.2.4@global/wrappers/ruby;
}
#else proxy_pass http://landing_page_ip;
}