Questions tagged [configuration]

Configuration is a general term that can refer to the arrangement of functional units according to their nature and characteristics. Also, it can refer to software configuration which more suitable for server-related topics.

Configuration is a general term that can refer to the arrangement of functional units according to their nature and characteristics. Also, it can refer to software configuration which more suitable for server-related topics.

A configuration file is usually a text file associated with a specific software which describes the initial settings of the software. Some applications provide tools to generate configuration files.

Some computer programs only read their configuration files at startup. Others periodically check the configuration files for changes. Users can instruct some programs to re-read the configuration files and apply the changes to the current process, or indeed to read arbitrary files as a configuration file. There are no definitive standards or strong conventions.

2704 questions
26
votes
6 answers

What are the advantages of putting secret values of a website as environment variables?

The devops guidelines at https://12factor.net/config suggest to put website secrets (database passwords, api keys, etc.) into environment variables. What advantages does that have instead of using text files (JSON, XML, YAML, INI, or similar)…
26
votes
1 answer

Override default nginx http configuration without changing default nginx.conf

My intention: I would like to override default configuration defined in /etc/nginx/nginx.conf (in debian 8). The idea is to keep this file completely untouched to ease future system updates and be able to get the latest changes for the options I did…
Gui-Don
  • 362
  • 1
  • 3
  • 8
26
votes
4 answers

How to write a DRY, modular nginx conf (reverse proxy) with named locations

I'm using nginx mostly as a reverse cachining proxy in front of several gunicon/mod_wsgi applications and of course to server static files. I find that quickly my nginx confs become impossible to maintain; the issue is that I have a few patterns…
Stefano
  • 763
  • 1
  • 12
  • 23
25
votes
1 answer

How to rotate log based on an interval unless log exceeds a certain size?

From the man page of logrotate: minsize size Log files are rotated when they grow bigger than size bytes, but not before the additionally specified time interval (daily, weekly, monthly, or yearly). The related size option is similar except…
Question Overflow
  • 2,103
  • 7
  • 30
  • 45
25
votes
1 answer

Changing SSH Port: Should I modify only sshd_config, or also ssh_config?

I would like to change my SSH port running Linux CentOS 6. From what I've read on forums, people recommend changing my /etc/ssh/sshd_config file to use a different port number, then restarting the SSHD service. I also noticed there's an ssh_config…
RCNeil
  • 615
  • 3
  • 9
  • 17
25
votes
6 answers

How do I set the date format to ISO globally in Linux?

I would like to globally set the Linux date format to ISO, which looks roughly like this: YYYY-MM-DD HH:MM:SS 2009-03-16 15:20:00 With varying levels of detail, such as omitting time, seconds, etc. I know that for some applications, you can…
Neil
  • 2,425
  • 8
  • 36
  • 45
24
votes
3 answers

How to if/else statement with nginx conf?

is it possible to do something like this with nginx? if ( $http_user_agent = "wget" ){ server { listen 192.0.2.11:1111; root /website1/; server_name website1.example www.website1.example; else server { …
user421936
  • 241
  • 1
  • 3
  • 4
24
votes
8 answers

How to check if Apache compression is working?

I just added the following to my Apache config file: AddOutputFilterByType DEFLATE text/html text/plain text/xml How do I check if it is actually working? Nothing on the browser tells me if the page contains gzipped content.
Alex R
  • 1,063
  • 3
  • 14
  • 29
24
votes
2 answers

How to split the nginx config across multiple lines?

Especially when configuring HPKP header (or other long headers in general) it would be useful to split a line in an nginx config over multiple lines. This is the desired…
rugk
  • 506
  • 2
  • 6
  • 18
24
votes
11 answers

Reloading PostgreSQL after configuration changes

I've made some changes to pg_hba.conf and I want them to take affect. I've found several places where people say that I can tell PostgreSQL to reload, but there are several different techniques listed, and none of them work for me yet. The most…
Don Kirkby
  • 1,354
  • 3
  • 11
  • 23
24
votes
2 answers

What is the difference between using upstream and location for php-fpm?

I've been searching around but couldn't find a straight answer, if someone could please clarify this, would be greatly appreciated, thanks! location ~ \.php$ { try_files $uri = 404; fastcgi_pass unix:/run/php-fpm/php-fpm.sock; …
Van Nguyen
  • 588
  • 3
  • 6
  • 15
23
votes
3 answers

How do I configure a location block to always return a single file in nginx?

In my application I want the location "/" to return a static index.html file, I want "/static" to serve static files from a folder and I want all other requests to return 404 NOT FOUND. At a later point I'm going to redirect all other requests to a…
Hubro
  • 1,138
  • 4
  • 16
  • 35
23
votes
2 answers

How should I use the directive in .htaccess?

I'm trying to add a conditional statement using Apache's If directive in my .htaccess file. I have referenced this page http://httpd.apache.org/docs/trunk/mod/core.html#if but it doesn't elaborate much / give many examples. Two incomplete examples…
cwd
  • 2,763
  • 9
  • 33
  • 48
23
votes
6 answers

Location of postgresql.conf and pg_hba.conf on an Ubuntu server

Where are the files postgresql.conf and pg_hba.conf on a Linux server running PostgreSQL 8.4 installed from Ubuntu repos?
Oleksandr
  • 391
  • 1
  • 2
  • 8
22
votes
1 answer

overriding nginx access_log directive - duplicate log entries

I'm using the default nginx package on Ubuntu 14.04 server. It is using /etc/nginx/nginx.conf as the main config, and then includes configs from /etc/nginx/conf.d/*.conf and /etc/nginx/sites-enabled/*. The default nginx config has this directive for…
Yoav Aner
  • 561
  • 2
  • 6
  • 13