• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install Nginx web server in OpenSUSE

{{postValue.id}}

To install Nginx web server in OpenSUSE

Nginx is an open source and high performance web server for Linux distributions. It is used to deliver large amounts of static content quickly with an efficient manner. Nginx can serve static content like plain HTML and media files. Installation of Nginx web server in OpenSuse is explained in this article.

Features

  • Easy to use.
  • Ability to handle static files, index files and auto-indexing.
  • Supports TLS/SSL with SNI and OCSP stapling.
  • SMTP, POP3 and IMAP proxy is available.

Installation of Ngnix

First add the repository, which is required to install Ngnix server.

linuxhelp:/home/user1 # zypper ar -r http://download.opensuse.org/repositories/server:/http/openSUSE_13.2/server:http.repo nginx
Adding repository ' Webservers and tools around it (openSUSE_13.2)'  ............................[done]
Repository ' Webservers and tools around it (openSUSE_13.2)'  successfully added
Enabled: Yes
Autorefresh: No
GPG check: Yes
URI: http://download.opensuse.org/repositories/server:/http/openSUSE_13.2/


Once the repository is added, refersh the machine.

linuxhelp:/home/user1 # zypper refresh
Repository ' openSUSE-13.2-0'  is up to date.
Retrieving repository ' openSUSE-13.2-Non-Oss'  metadata ........................................[done]
Building repository ' openSUSE-13.2-Non-Oss'  cache .............................................[done]
.
.
.
Retrieving repository ' Webservers and tools around it (openSUSE_13.2)'  metadata ...............[done]
Building repository ' Webservers and tools around it (openSUSE_13.2)'  cache ....................[done]
All repositories have been refreshed.


Install the Nginx package from the added repository by using the following command.

linuxhelp:/home/user1 # zypper install nginx
Loading repository data...
Reading installed packages...
Resolving package dependencies...
.
.
.
(1/3) Installing: libGeoIP1-1.5.1-4.1.2 .......................................................[done]
(2/3) Installing: GeoIP-1.5.1-4.1.2 ...........................................................[done]
(3/3) Installing: nginx-1.11.2-62.1 ...........................................................[done]


Start and enable the nginx service to access the Nginx server.

linuxhelp:/home/user1 # systemctl start nginx
linuxhelp:/home/user1 # systemctl enable nginx


Use the below command to check the status of Nginx service.

linuxhelp:/home/user1 # systemctl status nginx
nginx.service - The nginx HTTP and reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service  enabled)
   Active: active (running) since Wed 2016-09-14 19:12:35 IST  34s ago
 Main PID: 34837 (nginx)
   CGroup: /system.slice/nginx.service
           ??34837 nginx: master process /usr/sbin/nginx -g daemon off 
           ??34839 nginx: worker process

Sep 14 19:12:35 linuxhelp nginx[34835]: nginx: the configuration file /etc/nginx/nginx.conf sy...s ok
Sep 14 19:12:35 linuxhelp nginx[34835]: nginx: configuration file /etc/nginx/nginx.conf test i...sful
Hint: Some lines were ellipsized, use -l to show in full.


Go the web root directory, create a file and save as index.html.

linuxhelp:/home/user1 # cd /srv/www/htdocs/


Enter your own html codes into the newly created file.

linuxhelp:/srv/www/htdocs # vim index.html

index_file

Configure the Nginx server in the location /etc/nginx/nginx.conf

Configure_Nginx

Go to the web browser and enter " server-IP or hostname" to checkout the result.

WELCOME_TO_Nginx

Tags:
jackson
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

How can I use both Apache and nginx?

A

No you cant use a two different web servers for a single web applications

Q

Which is more complicated apache or nginx?

A

If you are well versed with apache, nginx can be a lot easier to use than a apache

Q

Why are you using Zypper?

A

You can even use default command. But Zypper will install the dependecies required

Q

Shall I use domain name to call in a web browser?

A

Yes if you have the Host entry you can call from the web

Q

What is an “instance” in Nginx?

A

An instance is a single copy of the software running on a single physical or virtual server. If you run two copies of the software on the same physical or virtual server, that counts as two instances.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Ganesh Konka ?
Zentya 6.1 http proxy configuration

please send link for creating zentyal 6.1 for http proxy and firewall as gateway.

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.