map $host $ym {
    ~*^(.*\.)?([^\.]+)\.([^\.]+)$    $2.$3;
    default ""; # 不能为空
}
server {
    listen 80;
    server_name $host;
    root /www/wwwroot/web;
    index index.html index.php;
    
    
    rewrite ^/robots\.txt$ /robots.php;
    rewrite ^/sitemap\.html$ /sitemap.php;
    rewrite ^/sitemap\.txt$ /sitemap.php;
    rewrite ^/sitemap\.xml$ /sitemap.php;
    if (!-e $request_filename) {
    	rewrite ^/(.*)$ /news.php?$1 last;
    }
    

    include enable-php-72.conf;
}