Nginx配置静态服务器与WEB应用服务器映射

主静态服务器:(MainStaticServer)                      
  起nginx                          
  ./usr/local/nginx/sbin/nginx                    
  启动端口映射:service portmap start                    
 

启动nfs service nfs start

此服务器中/data/staticfile为实际存放静态文件路径

                     
从静态服务器:(SlaveStaticServer)                      
  启动端口映射   service portmap start                  
  将主静态服务器上的文件挂载到当前服务器的相应路径   mount -t nfs MainStaticServerIP:/data/staticfile/ /data/staticfile/
web应用服务器:                          
  启动端口映射   service portmap start                  
  将主静态服务器上的文件挂载到当前服务器的相应路径   mount -t nfs MainStaticServerIP:/data/staticfile/ /data/staticfile/

你可能感兴趣的:(LINUX)