title: convert nginx to apache
body: <p>I am moving a php app from a server that runs ngnix to apache2. I need to convert the nginx configuration to a apache virtual host file.  I have found a lot resources on converting from apache to nginx but not a lot on going from nginx to apache. </p>
  
  <p>Here are the parts I need to convert:</p>
  
  <pre><code>rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1;
  
  # this allows people to use images and css in their maintenance.html file
    if ($request_filename ~* \.(css|jpg|gif|png)$) {
  break;
    }
  
    # this rewrites all the requests to the maintenance.html
    # page if it exists in the doc root. 
    if (-f $document_root/maintenance.html) {
  rewrite  ^(.*)$  /maintenance.html last;
  break;
    }
  
    location ~ .php$ {
  fastcgi_pass   127.0.0.1:1026;
  fastcgi_index  index.php;
  fastcgi_param  SCRIPT_FILENAME  /data/static/domain$fastcgi_script_name;
  include        fastcgi_params;
    }
  
    location ~ .js$ {
  fastcgi_pass   127.0.0.1:1026;
  fastcgi_param  SCRIPT_FILENAME  /data/static/domain$fastcgi_script_name;
  include        fastcgi_params;
    }
  
  }
  </code></pre>
  
  <p>I have already enable the fcgid mod on apache, but if there are any others I also need to enable, please let me know. The area that really confuses me is the last two parts where it has location.</p>
  
  <p>Thank you!</p>