def create_nginx_config(self):
cfg = '<STR_LIT>'.format(self._project_name)<EOL>if not self._shared_hosting:<EOL><INDENT>if self._user:<EOL><INDENT>cfg += '<STR_LIT>'.format(self._user)<EOL><DEDENT>cfg += '<STR_LIT>'.format(os.path.join(self._log_dir,self._project_name), os.path.join(self._var_dir, self._project_name))<EOL>cfg += '<STR_LIT>'<EOL>cfg += '<STR_LIT>'<EOL>if self._include_mimetypes:<EOL><INDENT>cfg += '<STR_LIT>'<EOL><DEDENT>cfg += '<STR_LIT>'<EOL>cfg += '<STR_LIT>'<EOL>cfg += '<STR_LIT>'<EOL>cfg += '<STR_LIT>'<EOL>cfg += '<STR_LIT>'.format(os.path.join(self._log_dir, self._project_name))<EOL>cfg += '<STR_LIT>'<EOL>cfg += '<STR_LIT>'<EOL><DEDENT>cfg += '<STR_LIT>'<EOL>cfg += '<STR_LIT>'.format(self._port)<EOL>if self._server_name:<EOL><INDENT>cfg += '<STR_LIT>'.format(self._server_name)<EOL><DEDENT>cfg += '<STR_LIT>'<EOL>cfg += '<STR_LIT>'.format(os.path.join(self._var_dir, self._project_name))<EOL>cfg += '<STR_LIT>'<EOL>cfg += '<STR_LIT>'<EOL>cfg += '<STR_LIT>'<EOL>cfg += '<STR_LIT>'<EOL>cfg += '<STR_LIT>'<EOL>cfg += '<STR_LIT>'<EOL>cfg += '<STR_LIT>'<EOL>if not self._shared_hosting:<EOL><INDENT>cfg += '<STR_LIT>'<EOL><DEDENT>f = open(self._nginx_config, '<STR_LIT:w>')<EOL>f.write(cfg)<EOL>f.close()<EOL>
Creates the Nginx configuration for the project