Yes, it is.
What you probably want is multiple “server” stanzas, each with a different port, but possibly (probably?) the same server_name, serving the “different” content appropriately within each one, maybe with a different document root in each server.
Full documentation is here:
http://nginx.org/en/docs/http/server_names.html
Example:
server {
listen 80;
server_name example.org www.example.org;
root /var/www/port80/
}
server {
listen 81;
server_name example.org www.example.org;
root /var/www/port81/
}
Related Posts:
- Difference in sites-available vs sites-enabled vs conf.d directories (Nginx)?
- Why do we use a OS Base Image with Docker if containers have no Guest OS?
- How to force nginx to resolve DNS (of a dynamic hostname) everytime when doing proxy_pass?
- What’s a .sh file?
- How to fix ‘sudo: no tty present and no askpass program specified’ error?
- How do I grep recursively?
- What does pss mean in /proc/pid/smaps
- apt-get error: Sub-process /usr/bin/dpkg returned an error code (1)
- error: ‘Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’ — Missing /var/run/mysqld/mysqld.sock
- How do I grep recursively?
- how to find libstdc++.so.6: that contain GLIBCXX_3.4.19 for RHEL 6?
- How to extract C source code from .so file?
- subprocess.Popen(): OSError: [Errno 8] Exec format error in python?
- How to substitute shell variables in complex text files
- How can I recursively find all files in current and subfolders based on wildcard matching?
- Curl command for https ( SSL )
- “sed” command in bash
- How to exclude a directory in find . command
- How can I find all *.js file in directory recursively in Linux?
- Argument list too long error for rm, cp, mv commands
- Difference between using “chmod a+x” and “chmod 755”
- ssh: Could not resolve hostname [hostname]: nodename nor servname provided, or not known
- WSL – GEDIT Unable to init server: Could not connect: Connection refused
- Python subprocess.Popen “OSError: [Errno 12] Cannot allocate memory”
- Install tkinter for Python
- How to open some ports on Ubuntu?
- Given two directory trees, how can I find out which files differ by content?
- Uncompress tar.gz file
- What does it mean to mount a file system in linux?
- curl: (6) Could not resolve host: google.com; Name or service not known
- How to pass password to scp?
- scp gives “not a regular file”
- -bash: fork: Cannot allocate memory
- Explanation of polkitd Unregistered Authentication Agent
- CentOS error – sudo: effective uid is not 0, is sudo installed setuid root?
- Merge / convert multiple PDF files into one PDF
- scp from Linux to Windows
- Bash script: bad interpreter
- PHP and mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
- How to grep and replace
- node.js: cannot find module ‘request’
- What is the reason and how to avoid the [FIN, ACK] , [RST] and [RST, ACK]
- What does “&” at the end of a linux command mean?
- How to recursively download a folder via FTP on Linux
- httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
- How do I write stderr to a file while using “tee” with a pipe?
- How to include file in a bash shell script
- Does Mac OS X use Linux?
- bash sh – command not found
- Changing permalinks gives me 404 errors on nginx
- Hosting multiple WordPress sites on single server – best practices?
- WordPress Update – This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php
- Infinite Loop in WordPress Installation
- 504/502 errors plauging our site
- Can scp copy directories recursively?
- Copying a large directory tree locally? cp or rsync?
- What are the functional differences between .profile .bash_profile and .bashrc
- Check if port is open or closed on a Linux server?
- Why does my hostname appear with the address 127.0.1.1 rather than 127.0.0.1 in /etc/hosts?
- Linux command to inspect TXT records of a domain [closed]
- When does `cron.daily` run?
- How to run a command multiple times, using bash shell?
- How to reconnect to a disconnected ssh session
- What does a + mean at the end of the permissions from ls -l?
- Should I quit using Ifconfig?
- SSL Certificate Location on UNIX/Linux
- What is “-bash: !”: event not found”
- What version of RHEL am I using?
- Keeping a linux process running after I logout
- Force dig to resolve without using cache
- How do you make it obvious you are on a production system?
- How can I verify if TLS 1.2 is supported on a remote web server from the RHEL/CentOS shell?
- How to forcibly close a socket in TIME_WAIT?
- How to check if an RSA public / private key pair match
- Mount CIFS Host is down
- List of files installed from apt package
- How can I kill all stopped jobs?
- How to copy a large number of files quickly between two servers
- How to copy file preserving directory path in Linux?
- Postfix – how to retry delivery of mail in queue?
- Allow SFTP but disallow SSH?
- Is it possible to alias a hostname in Linux?
- How do I list loaded Linux module parameter values?
- Does getting disconnected from an SSH session kill your programs?
- Tips for Securing a LAMP Server
- What Linux distribution is the Amazon Linux AMI based on?
- What is this IP address: 169.254.169.254?
- How can I export the privileges from MySQL and then import to a new server?
- Is there a directory equivalent of /dev/null in Linux?
- Can I send some text to the STDIN of an active process running in a screen session?
- How can I get processor/RAM/disk specs from the Linux command Line? [duplicate]
- Should I install Linux applications in /var or /opt?
- Is there a way to see the execution tree of systemd?
- How to determine the hostname from an IP address in a Windows network?
- create home directories after create users
- How do I redirect subdomains to a different port on the same server?
- Running Cron every 2 hours [duplicate]
- How to check the physical status of an ethernet port in Linux?
- What does “debconf: delaying package configuration, since apt-utils is not installed” mean?
- In Linux, what is the difference between “buffers” and “cache” reported by the free command?