Most Popular

1500 questions
102
votes
6 answers

Tips for Securing a LAMP Server

This is a Canonical Question about Securing a LAMP stack What are the absolute guidelines for securing a LAMP server?
102
votes
4 answers

How to inspect remote SMTP server's TLS certificate?

We have an Exchange 2007 server running on Windows Server 2008. Our client uses another vendor's mail server. Their security policies require us to use enforced TLS. This was working fine until recently. Now, when Exchange tries to deliver mail…
102
votes
4 answers

What is the maximum port number in Linux?

I'd like to set some Linux services to non-standard ports - what's the highest valid port number?
Yehosef
  • 1,365
101
votes
4 answers

Is there a directory equivalent of /dev/null in Linux?

When configuring an application, you can often use /dev/null as config file if you want the application to read an empty file. But, if the application reads a list of files from a directory, you cannot use this trick. You would need to give it an…
roelvanmeer
  • 1,805
101
votes
4 answers

Does each subdomain need its own SSL certificate?

I am creating a websocket server which will live on ws.mysite.example. I want the web socket server to be SSL encrypted as well as domain.example to be SSL encrypted. Do I need to purchase a new certificate for each subdomain I create? Do I need a…
user974407
  • 1,151
101
votes
8 answers

How to send emails and avoid them being classified as spam?

This is a canonical question about how to handle email sent from your server being misclassified as spam. For additional information you may find these similar questions helpful: Best Practices for preventing you from looking like a spammer…
kcode
  • 1,885
101
votes
1 answer

How can one distinguish the host and the port in an IPv6 URL?

URLs always have this format: ://[:]/[][#] The problem is that IPv6 uses colons, just like the separator of port and host, e.g: 2001:db8:1f70::999:de8:7648:6e8 But what if this is the host, and I want to connect…
user42235
101
votes
5 answers

How to make a modification take affect without restarting nginx?

Apache has a graceful option which can scan for modification in http.conf without restarting Apache. What about nginx?
vps
  • 1,247
100
votes
6 answers

Windows Active Directory naming best practices?

This is a Canonical Question about Active Directory domain naming. After experimenting with Windows domains and domain controllers in a virtual environment, I've realized that having an active directory domain named identically to a DNS domain is…
100
votes
10 answers

Route 53 doesn't allow adding DKIM keys because length is too long

Here is how I enter the value for DKIM key: "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwztXzIUqic95qSESmnqX U5v4W4ENbciFWyBkymsmmSNOhLlEtzp/mnyhf50ApwCTGLK9U7goo/ijX/wr5roy…
Gasim
  • 1,257
100
votes
6 answers

Assign Public IP (not Elastic IP) after instance launched

When I launch instance in AWS console I can set "Auto-assign Public IP" to true and newly created instance will be assigned with public IP address from pool. Now assume I have launched instance with this setting set to false and want to assign…
100
votes
8 answers

Best way to disable swap in Linux

I am running a custom compiled 3.18.9 kernel and I am wondering about the best way to disable swap on the system. I also use init if it makes a difference. Is it enough to comment or remove the swap line in /etc/fstab to prevent swap from…
user283167
  • 1,003
100
votes
6 answers

Standard place for user defined bash_completion.d scripts?

I have user access (no root) into a Linux (Suse) machine where I developed some bash scripts and the corresponding bash autocompletion rules. Since the scripts belong only to my user and therefore I need the complete rules only "active" for me (a…
Carles Sala
  • 1,103
100
votes
1 answer

Nested Nginx location (prefix blocks in regex blocks) not working

I'm having trouble understanding nested locations in nginx. I have two locations with some configuration directives in common, so rather than repeat the directives, I'd prefer to repeat the URI using a regular-expression: location ~ /a|/b { …
Jayen
  • 1,907
99
votes
11 answers

How can I export the privileges from MySQL and then import to a new server?

I know how to export/import the databases using mysqldump & that's fine but how do I get the privileges into the new server. For extra points, there are a couple of existing databases on the new one already, how do I import the old servers…