mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-11-05 18:56:09 +08:00
Single file config + formatting fixes!
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import sslProfiles from '../../util/ssl_profiles';
|
||||
import websiteConf from './website.conf';
|
||||
|
||||
export default (domains, global) => {
|
||||
const config = {};
|
||||
@@ -105,7 +106,10 @@ export default (domains, global) => {
|
||||
|
||||
// Single file configs
|
||||
if (!global.tools.modularizedStructure.computed) {
|
||||
// TODO: figure out merging in all the other configs
|
||||
for (const domain of domains) {
|
||||
config.http.push([`# ${domain.server.domain.computed}`, '']);
|
||||
config.http.push(...websiteConf(domain, domains, global));
|
||||
}
|
||||
}
|
||||
|
||||
// Done!
|
||||
|
||||
@@ -132,7 +132,7 @@ export default (domain, domains, global) => {
|
||||
&& (!domain.reverseProxy.reverseProxy.computed || domain.reverseProxy.path.computed !== '/')) {
|
||||
serverConfig.push([`# index.${domain.routing.fallbackHtml.computed ? 'html' : (domain.routing.fallbackPhp.computed ? 'php' : '')} fallback`, '']);
|
||||
serverConfig.push(['location /', {
|
||||
try_files: `$uri $uri/ /index.${domain.routing.fallbackHtml.computed ? '.html' : (domain.routing.fallbackPhp.computed ? '.php?$query_string' : '')}`,
|
||||
try_files: `$uri $uri/ /index.${domain.routing.fallbackHtml.computed ? 'html' : (domain.routing.fallbackPhp.computed ? 'php?$query_string' : '')}`,
|
||||
}]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user