nextcloud centos nextcloud centos 7 nginx nextcloud centos 6 nextcloud centos repo nextcloud centos 7 apache nextcloud centos rpm nextcloud centos 6.8 nextcloud centos ssl nextcloud centos selinux nextcloud centos 7 ssl nextcloud centos apache nextcloud centos 7 nextcloud apache centos 7 nextcloud auf centos nextcloud auf centos installieren nextcloud centos client nextcloud collabora centos nextcloud client centos 7 nextcloud collabora centos 7 nextcloud.conf centos install nextcloud client centos 7 nextcloud client centos 6 nextcloud docker centos nextcloud en centos 7 instalar nextcloud en centos 7 nextcloud centos https nextcloud https centos 7 nextcloud centos 7 how to nextcloud centos install nextcloud install centos 6 nextcloud install centos nginx nextcloud install centos 7 nginx nextcloud 12 install centos 7 nextcloud 11 install centos 7 instalar nextcloud centos 7 instalar nextcloud centos instalar nextcloud centos 6 nextcloud installieren centos 7 nextcloud letsencrypt centos nextcloud centos ldap nextcloud mariadb centos 7 nextcloud memcached centos nextcloud centos nginx install nextcloud nginx centos 7 nextcloud on centos 7 nextcloud on centos 6 nextcloud 12 on centos 7 setup nextcloud on centos 7 nextcloud 12 on centos onlyoffice nextcloud centos nextcloud centos php7 centos web panel owncloud nextcloud php7 centos 7 nextcloud centos 7 php 7 nextcloud centos 7 php 5.6 nextcloud centos php nextcloud permissions centos centos plesk nextcloud nextcloud centos repository nextcloud redis centos nextcloud rpm centos 7 nextcloud repository centos 7 nextcloud repo centos 7 nextcloud setup centos nextcloud ssl centos 7 nextcloud server centos 7 nextcloud centos 7 selinux setup nextcloud centos 7 nextcloud tutorial centos uninstall nextcloud centos uninstall nextcloud centos 7 centos with nextcloud centos yum nextcloud nextcloud 12 centos 7 nextcloud 11 centos 7 nextcloud 10 centos 7 centos nextcloud 11 nextcloud 12 centos 7 install nextcloud 10 centos nextcloud 11 centos 7 install nextcloud 12 centos 6 nextcloud 11 centos 6 install nextcloud 10 centos 7 nextcloud установка centos 6 nextcloud centos 7 https nextcloud centos 7 repo nextcloud centos 7 rpm nextcloud centos 7 php7 nextcloud centos 7 howto centos 7 nextcloud 12 centos 7 nextcloud 10 centos 7 nextcloud client centos 7 nextcloud ssl centos 7 nextcloud 11 install nextcloud centos nginx nextcloud install centos nginx install nextcloud nginx centos 7 centos 7 nextcloud 12 nginx nextcloud centos 7 nginx install nextcloud centos 7 nginx nextcloud nginx nextcloud nginx reverse proxy nextcloud nginx proxy nextcloud nginx vs apache nextcloud nginx docker nextcloud nginx install nextcloud nginx debian nextcloud nginx ubuntu nextcloud nginx bad gateway nextcloud nginx 404 not found nextcloud nginx webdav nextcloud nginx config nextcloud nginx apache nextcloud nginx access denied nextcloud nginx arch linux nextcloud arch nginx nextcloud and nginx nextcloud nginx access forbidden by rule nextcloud nginx oder apache nextcloud behind nginx reverse proxy nextcloud behind nginx nextcloud behind nginx proxy nextcloud nginx centos nextcloud nginx config file nextcloud nginx css nextcloud nginx collabora online nextcloud nginx cache nextcloud nginx collabora nextcloud 11 nginx config nextcloud nginx proxy config install nextcloud nginx centos nextcloud nginx digitalocean nextcloud nginx debian 8 nextcloud nginx debian 9 nextcloud docker nginx.conf nextcloud docker nginx letsencrypt nextcloud docker nginx reverse proxy nextcloud docker nginx proxy nextcloud nginx example nextcloud nginx error 500 letsencrypt nginx nextcloud nextcloud nginx internal server error nextcloud nginx freebsd nextcloud nginx fastcgi nextcloud nginx file size nextcloud nginx file not found nextcloud nginx fpm nextcloud nginx forbidden nextcloud nginx 403 forbidden nextcloud access forbidden nginx nextcloud nginx gateway timeout nextcloud nginx github nextcloud nginx gzip gentoo nextcloud nginx nextcloud nginx https nextcloud nginx howto nextcloud nginx htaccess nextcloud nginx http2 nextcloud nginx hsts nextcloud nginx header nextcloud nginx index.php nextcloud nginx index nextcloud install nginx ubuntu nextcloud 12 nginx install nextcloud 11 nginx install install nextcloud nginx centos 7 nextcloud in nginx nextcloud nginx jessie nextcloud nginx location nextcloud nginx letsencrypt docker nextcloud nginx letsencrypt nextcloud nginx redirect loop linux babe nextcloud nginx nextcloud upload limit nginx raspberry pi nextcloud nginx letsencrypt nextcloud nginx memcached nextcloud nginx mariadb nextcloud nginx mysql nextcloud nginx too many redirects nextcloud spreed.me nginx nextcloud mit nginx nextcloud ubuntu nginx mariadb nextcloud nginx php memory cache nextcloud mit nginx installieren nextcloud nginx not found nextcloud nginx no input file specified nextcloud nginx or apache nextcloud nginx opcache nginx nextcloud owncloud install nextcloud on nginx nextcloud on nginx nextcloud onlyoffice nginx nextcloud nginx x-frame-options omv nextcloud nginx nextcloud nginx php-fpm nextcloud nginx postgresql nextcloud nginx proxy_pass nextcloud nginx pretty urls nextcloud nginx performance nextcloud nginx primary script unknown nextcloud nginx php nextcloud nginx postgres nextcloud nginx rewrite nextcloud nginx raspberry pi nextcloud nginx redis nextcloud nginx reverse proxy config nextcloud nginx reverse proxy ssl nextcloud nginx reverse proxy configuration nextcloud nginx raspberry nextcloud nginx raspbian nextcloud nginx setup nextcloud nginx subdirectory nextcloud nginx subfolder nextcloud nginx slow nextcloud nginx settings nextcloud nginx strict-transport-security nextcloud nginx sameorigin nextcloud nginx subdir nextcloud nginx subdomain nextcloud nginx tutorial nextcloud nginx timeout nextcloud welcome to nginx tuto nextcloud nginx nextcloud nginx ubuntu 16.04 nextcloud nginx upload nextcloud nginx ubuntu 16 nextcloud nginx upload size nextcloud 12 nginx ubuntu 16.04 nextcloud nginx php 7 ubuntu nextcloud installation ubuntu nginx nextcloud nginx vhost nextcloud vm nginx nextcloud nginx webrtc install nextcloud with nginx configure nextcloud with nginx nextcloud with nginx nextcloud nginx x-xss-protection x-frame-options nextcloud nginx nextcloud nginx 16.04 nextcloud nginx 11 nextcloud nginx 12 nextcloud 10 nginx nextcloud 12 nginx reverse proxy nextcloud 11 nginx configuration nextcloud nginx 302 nextcloud nginx raspberry pi 3 raspberry pi 3 nginx nextcloud nextcloud nginx 403 synology nextcloud nginx 404 nextcloud nginx 502 bad gateway nextcloud nginx 502 nextcloud nginx 503 nextcloud nginx centos 7 centos 7 nextcloud nginx centos 7 nextcloud 12 nginx nextcloud 9 nginx debian 9 nextcloud nginx nextcloud https nextcloud https setup nextcloud https redirect nextcloud https not working nextcloud https docker nextcloud https port nextcloud https nginx nextcloud https centos 7 nextcloud https configuration nextcloud https freenas nextcloud https einrichten nextcloud https aktivieren nextcloud https apache nextcloud auf https umstellen nextcloud activate https nextcloud and https nextcloud https all-inkl nextcloud auf https nextcloud box https nextcloud https certificate sudo nextcloud.enable-https command not found nextcloud con https nextcloud client https nextcloud mac client https nextcloud disable https nextcloud https deaktivieren nextcloud https enable nextcloud https erzwingen nextcloud.enable-https command not found nextcloud.enable-https letsencrypt nextcloud enforce https sudo nextcloud.enable-https letsencrypt nextcloud snap enable https sudo nextcloud.enable-https self-signed nextcloud https force https for nextcloud nextcloud https not found nextcloud https htaccess nextcloud http https nextcloud install https nextcloud immer https nextcloud https konfigurieren nextcloud https letsencrypt https nextcloud letsencrypt https //nextcloud login make nextcloud https nextcloud mit https nextcloud mac https nextcloud no https nextcloud nur https nextcloud https only nextcloud https on freenas nextcloud ohne https nextcloud https proxy nextcloud https raspberry pi nextcloud https reverse proxy nextcloud https config.php nextcloud qnap https nextcloud https rewrite nextcloud 12 https redirect nextcloud disable https redirect nextcloud https raspberry nextcloud https synology nextcloud set https nextcloud 11 https setup nextcloud snappy https nextcloud.enable-https self-signed nextcloud redirect to https nextcloud https tutorial nextcloud https ubuntu nextcloud use https nextcloud https umstellen nextcloud https umleitung uberspace nextcloud https setup nextcloud with https nextcloud without https nextcloud webdav https nextcloud with https https webmail next cloud wonderfall nextcloud https nextcloud 11 https nextcloud 12 https nextcloud 10 https nextcloud ubuntu 16.04 https nextcloud 11 https erzwingen nextcloud nginx https nextcloud centos nginx https

Install Nginx and PHP7-FPM

First of all, add the EPEL repository, which contains Nginx:
# yum install epel-release
Next, install Nginx:
# yum install nginx



rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

yum install -y httpd wget bzip2 nano unzip

Now, it’s possible to install PHP7-FPM and some Nextcloud dependencies:
# yum install php70w-fpm php70w-pecl-apcu-devel php70w-json php70w-pecl-apcu php70w-gd php70w-mcrypt php70w-mysql php70w-cli php70w-pear php70w-xml php70w-mbstring php70w-pdo
Check the PHP version to be sure that everything went well, with:
# php -v

Configure PHP-FPM

After installation, a configuration of PHP is required for use with Nginx. With a text editor, edit the /etc/php-fpm.d/www.conf file. In there, search lines containing user and groupstrings and modify as follows:
user = nginx
group = nginx
In the same file, look for listen string, and modify that too:
listen = 127.0.0.1:9000
PHP will listen on port 9000.
Uncomment the following lines:
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
Save and exit.
Create a new directory in /var/lib and change its owner to nginx user:
# mkdir -p /var/lib/php/session
# chown nginx:nginx -R /var/lib/php/session/
Start and enable both Nginx and PHP7-FPM:
# systemctl start php-fpm
# systemctl start nginx
# systemctl enable php-fpm
# systemctl enable nginx

Install MariaDB

yum -y install mariadb-server mariadb

systemctl start mariadb

systemctl enable mariadb

Then, configure the root account for MariaDB:
# mysql_secure_installation
Set root password? [Y/n]
New password: my_strong_root_password
Re-enter new password: my_strong_root_password

Remove anonymous users? [Y/n]
Disallow root login remotely? [Y/n]
Remove test database and access to it? [Y/n]
Reload privilege tables now? [Y/n]
Now, it’s time to login to MariaDB and configure it for use with Nextcloud:
# mysql -u root -p
In its shell:
mysql> CREATE DATABASE my_nextclouddb;
mysql> CREATE USER ncuser@localhost IDENTIFIED BY 'ncuser@';
mysql> GRANT ALL PRIVILEGES ON my_nextclouddb.* TO ncuser@localhost IDENTIFIED BY 'ncuser@';
mysql> FLUSH PRIVILEGES;
mysql> EXIT;

Generate a SSL certificate

For using Nextcloud with HTTPS connection with the client, you’ll need an SSL certificate. Generate a self-signed one with OpenSSL. First, create a new directory for that file:
# mkdir -p /etc/nginx/cert/
and generate it:
Go to Letsencrypt and create 
make sure combine crt file add to nginx config
/etc/nginx/cert/nextcloud.crt 
 /etc/nginx/cert/nextcloud.key

N.B: the /etc/nginx/cert/ will contain all the SSL certificates your server will require eventually.
Change permissions:
# chmod 700 /etc/nginx/cert
# chmod 600 /etc/nginx/cert/*


install Nextcloud

Now it’s time to download and install Nextcloud. Download the archive with:
# https://download.nextcloud.com/server/releases/latest-12.zip
Extract it and move to /usr/share/nginx/html/
# unzip latest-12.zip

# mv nextcloud/ /usr/share/nginx/html/
Create a new data directory for Nextcloud:
# mkdir -p /usr/share/nginx/html/nextcloud/data/
Change the owner of nextcloud to nginx user:
# chown nginx:nginx -R /usr/share/nginx/html/nextcloud

Configure a Virtual Host for Nextcloud

Create a new Virtual Host configuration file, /etc/nginx/conf.d/nextcloud.conf. There, paste the following configuration:
upstream php-handler {
    server 127.0.0.1:9000;
    #server unix:/var/run/php5-fpm.sock;
}
 
server {
    listen 80;
    server_name storage.mydomain.com;
    # enforce https
    return 301 https://$server_name$request_uri;
}
 
server {
    listen 443 ssl;
    server_name storage.mydomain.com;
 
    ssl_certificate /etc/nginx/cert/nextcloud.crt;
    ssl_certificate_key /etc/nginx/cert/nextcloud.key;
 
    # Add headers to serve security related headers
    # Before enabling Strict-Transport-Security headers please read into this
    # topic first.
    add_header Strict-Transport-Security "max-age=15768000;
    includeSubDomains; preload;";
    add_header X-Content-Type-Options nosniff;
    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none;
    add_header X-Download-Options noopen;
    add_header X-Permitted-Cross-Domain-Policies none;
 
    # Path to the root of your installation
    root /usr/share/nginx/html/nextcloud/;
 
    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }
 
    # The following 2 rules are only needed for the user_webfinger app.
    # Uncomment it if you're planning to use this app.
    #rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
    #rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json
    # last;
 
    location = /.well-known/carddav {
      return 301 $scheme://$host/remote.php/dav;
    }
    location = /.well-known/caldav {
      return 301 $scheme://$host/remote.php/dav;
    }
 
    # set max upload size
    client_max_body_size 512M;
    fastcgi_buffers 64 4K;
 
    # Disable gzip to avoid the removal of the ETag header
    gzip off;
 
    # Uncomment if your server is build with the ngx_pagespeed module
    # This module is currently not supported.
    #pagespeed off;
 
    error_page 403 /core/templates/403.php;
    error_page 404 /core/templates/404.php;
 
    location / {
        rewrite ^ /index.php$uri;
    }
 
    location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
        deny all;
    }
    location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
        deny all;
    }
 
    location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
        include fastcgi_params;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param HTTPS on;
        #Avoid sending the security headers twice
        fastcgi_param modHeadersAvailable true;
        fastcgi_param front_controller_active true;
        fastcgi_pass php-handler;
        fastcgi_intercept_errors on;
        fastcgi_request_buffering off;
    }
 
    location ~ ^/(?:updater|ocs-provider)(?:$|/) {
        try_files $uri/ =404;
        index index.php;
    }
 
    # Adding the cache control header for js and css files
    # Make sure it is BELOW the PHP block
    location ~* \.(?:css|js)$ {
        try_files $uri /index.php$uri$is_args$args;
        add_header Cache-Control "public, max-age=7200";
        # Add headers to serve security related headers (It is intended to
        # have those duplicated to the ones above)
        # Before enabling Strict-Transport-Security headers please read into
        # this topic first.
        add_header Strict-Transport-Security "max-age=15768000;
        includeSubDomains; preload;";
        add_header X-Content-Type-Options nosniff;
        add_header X-Frame-Options "SAMEORIGIN";
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Robots-Tag none;
        add_header X-Download-Options noopen;
        add_header X-Permitted-Cross-Domain-Policies none;
        # Optional: Don't log access to assets
        access_log off;
    }
 
    location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
        try_files $uri /index.php$uri$is_args$args;
        # Optional: Don't log access to other assets
        access_log off;
    }
}
Save, exit and test Nginx with:
# nginx -t
Then, restart it:
# systemctl restart nginx


Firewall

Configure the firewall to allow access to the Nextcloud storage from external machines.
FirewallD:
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload
setenforce 0
nano /etc/selinux/cofig (enforce tp permissive)



Manusha

Manusha Amal

මගේ තියන අත්දැකීම් මේ බ්ලොග් එක කියවන ඔබට පේනවනේ, ඉතින් ඔයාලට ගැටළුවක් අවොත් මාව Contact කරගන්න පුළුවන්.

Post A Comment:

0 comments:

දිරියක් වෙන්න අදහස් පෙළක් දාන්න