Filmora
Software was originally posted at : https://www.piratecity.co/softwares/wondershare-filmora-cracked/
Working copies owncloud x
$CONFIG = array (
'instanceid' => 'ocgawawix5k2',
'passwordsalt' => 'xku8CqiWzVfLVAvTjvVDG6uv+K7n87',
'secret' => 'wvBA2lNTf0TZyQZW8HSvjOh8jbYff75P85aNM6YDInCPsCgm',
'trusted_domains' =>
array (
0 => 'cloud.fteindia.com',
),
'datadirectory' => '/usr/share/nginx/cloud.fteindia.com/data',
'overwrite.cli.url' => 'https://cloud.fteindia.com',
'dbtype' => 'mysql',
'version' => '10.1.0.4',
'dbname' => 'ftecloud',
'dbhost' => 'localhost:5432',
'dbtableprefix' => 'oc_',
'dbuser' => 'ftecloud',
'dbpassword' => 'sujasivashanmugam',
'logtimezone' => 'UTC',
'installed' => true,
);
server 127.0.0.1:9000;
# Depending on your used PHP version
#server unix:/var/run/php5-fpm.sock;
#server unix:/var/run/php7-fpm.sock;
}
server {
listen 80;
server_name cloud.fteindia.com;
# For SSL certificate verifications, this needs to be served via HTTP
location /.well-known/(acme-challenge|pki-validation)/ {
root /usr/share/nginx/cloud.fteindia.com; # Specify here where the challenge file is placed
}
# enforce https
location / {
return 301 https://$server_name$request_uri;
}
}
server {
listen 443 ssl http2;
server_name cloud.fteindia.com;
ssl_certificate /etc/letsencrypt/live/cloud.fteindia.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/cloud.fteindia.com/privkey.pem; # managed by Certbot
# Example SSL/TLS configuration. Please read into the manual of NGINX before applying these.
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "-ALL:EECDH+AES256:EDH+AES256:AES256-SHA:EECDH+AES:EDH+AES:!ADH:!NULL:!aNULL:!eNULL:!EXPORT:!LOW:!MD5:!3DES:!PSK:!SRP:!DSS:!AESGCM:!RC4";
# ssl_dhparam /etc/nginx/dh4096.pem;
ssl_prefer_server_ciphers on;
keepalive_timeout 70;
ssl_stapling on;
ssl_stapling_verify off;
# Add headers to serve security related headers
# The always parameter ensures that the header is set for all responses, including internally generated error responses.
# Before enabling Strict-Transport-Security headers please read into this topic first.
# https://www.nginx.com/blog/http-strict-transport-security-hsts-and-nginx/
#add_header Strict-Transport-Security "max-age=15552000; includeSubDomains; preload" always;
add_header X-Content-Type-Options nosniff always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Robots-Tag none always;
add_header X-Download-Options noopen always;
add_header X-Permitted-Cross-Domain-Policies none always;
# Path to the root of your installation
root /usr/share/nginx/cloud.fteindia.com/;
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 8 4K; # Please see note 1
fastcgi_ignore_headers X-Accel-Buffering; # Please see note 2
# Disable gzip to avoid the removal of the ETag header
# Enabling gzip would also make your server vulnerable to BREACH
# if no additional measures are done. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773332
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)/ {
return 404;
}
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
return 404;
}
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|ocm-provider/.+|core/templates/40[34])\.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name; # necessary for owncloud to detect the contextroot https://github.com/owncloud/core/blob/v10.0.0/lib/private/AppFramework/Http/Request.php#L603
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice
fastcgi_param front_controller_active true;
fastcgi_read_timeout 180; # increase default timeout e.g. for long running carddav/ caldav syncs with 1000+ entries
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off; #Available since NGINX 1.7.11
}
location ~ ^/(?:updater|ocs-provider|ocm-provider)(?:$|/) {
try_files $uri $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 "max-age=15778463" always;
# Add headers to serve security related headers (It is intended to have those duplicated to the ones above)
# The always parameter ensures that the header is set for all responses, including internally generated error responses.
# Before enabling Strict-Transport-Security headers please read into this topic first.
# https://www.nginx.com/blog/http-strict-transport-security-hsts-and-nginx/
#add_header Strict-Transport-Security "max-age=15552000; includeSubDomains; preload" always;
add_header X-Content-Type-Options nosniff always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Robots-Tag none always;
add_header X-Download-Options noopen always;
add_header X-Permitted-Cross-Domain-Policies none always;
# Optional: Don't log access to assets
access_log off;
}
location ~ \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg|map|json)$ {
add_header Cache-Control "public, max-age=7200" always;
try_files $uri /index.php$uri$is_args$args;
# Optional: Don't log access to other assets
access_log off;
}
}
How to create a user in MySQL/MariaDB and grant permissions on a specific database
How to create a user in MySQL/MariaDB and grant permissions on a specific database
Creating a user in MySQL or MariaDB and granting permissions to him to access a specific database and be able to write data on it is a very usual task that is necessary to perform each time you install a new application based on any of these database engines, like web applications running on top of LAMP stack. Whether it is a simple WordPress, or a more complex application tailor made, one way or another you will always have to complete these steps at some point before its deployment.
These commands are valid to be executed both from the generic MySQL command line interface and from any other tool that allows to execute SQL commands against a MySQL instance such as phpMyAdmin or MySQL Workbench. They can also be run in MariaDB with identical result.
1. Database creation
mysql> CREATE DATABASE `mydb`;
2. User creation
mysql> CREATE USER 'myuser' IDENTIFIED BY 'mypassword';
3. Grant permissions to access and use the MySQL server
Only allow access from localhost (this is the most secure and common configuration you will use for a web application):
mysql> GRANT USAGE ON *.* TO 'myuser'@localhost IDENTIFIED BY 'mypassword';
To allow access to MySQL server from any other computer on the network:
mysql> GRANT USAGE ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword';
4. Grant all privileges to a user on a specific database
mysql> GRANT ALL privileges ON `mydb`.* TO 'myuser'@localhost;
As in the previous command, if you want the user to work with the database from any location you will have to replace localhost with '%'.
5. Apply changes made
To be effective the new assigned permissions you must finish with the following command:
mysql> FLUSH PRIVILEGES;
6. Verify your new user has the right permissions
mysql> SHOW GRANTS FOR 'myuser'@localhost; +--------------------------------------------------------------+ | Grants for myuser@localhost | +--------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'myuser'@'localhost' | | GRANT ALL PRIVILEGES ON `mydb`.* TO 'myuser'@'localhost' | +--------------------------------------------------------------+ 2 rows in set (0,00 sec)
If you made a mistake at some point you can undo all the steps above by executing the following commands, taking the precaution of replacing localhost with '%' if you also changed it in the previous commands:
DROP USER myuser@localhost; DROP DATABASE mydb;
Finally, here is a very simple and small script in Bash that will help you to do all this in a much faster and direct way. Simply change your user and database names, and that's it:
#! /bin/bash newUser='testuser' newDbPassword='testpwd' newDb='testdb' host=localhost #host='%' commands="CREATE DATABASE \`${newDb}\`;CREATE USER '${newUser}'@'${host}' IDENTIFIED BY '${newDbPassword}';GRANT USAGE ON *.* TO '${newUser}'@'${host}' IDENTIFIED BY '${newDbPassword}';GRANT ALL privileges ON \`${newDb}\`.* TO '${newUser}'@'${host}';FLUSH PRIVILEGES;" echo "${commands}" | /usr/bin/mysql -u root -p
working copy of nginx virtual host
Founder of Arththavial
Founder President, Intellectual Development Foundation
விதியில் இல்லாதது மதியில் தோன்றாது
How to Run Multiple Websites with Different PHP Versions in Nginx
Sometimes PHP developers want to build and run different websites/applications using different versions of PHP on the same web server. As a Linux system administrator, you are required to setup a environment where you can run multiple websites using different PHP version on a single web server i.e. Nginx.
In this tutorial, we will explain you how to install multiple versions of PHP and configure the web server Nginx to work with them via the server blocks (virtual hosts in Apache) in CentOS/RHEL 7 distributions using LEMP stack.
Read Also: Pyenv – Install Multiple Python Versions for Specific Project
Nginx uses PHP-FPM (stands for FastCGI Process Manager), which is an alternative PHP FastCGI implementation with some extra, useful features for heavily loaded websites.
Testing Environment Setup
- A CentOS 7 or RHEL 7 server with minimal installation.
- Nginx HTTP Server.
- PHP 7.1 (to be used as default version) and 5.6.
- MariaDB Database Server.
- Server IP address: 192.168.56.10.
- Websites: example1.com and example2.com.
Step 1: Installing and Enabling EPEL and Remi Repository
1. First start by installing and enabling the EPEL and Remi repository, which offers the latest versions of the PHP stack on CentOS/RHEL 7 distributions.
# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
2. Next install the yum-utils package, which extends yum's native functionalities and provides yum-config-manager command, which is used to enable or disable Yum repositories on the system.
# yum install yum-utils
Note: On RHEL 7 you can enable the optional channel for some dependencies using the following command.
# subscription-manager repos --enable=rhel-7-server-optional-rpms
Step 2: Installing Nginx Web Server
3. To install latest version of Nginx, we need to add the official Nginx repository, create a file named /etc/yum.repos.d/nginx.repo.
# vi /etc/yum.repos.d/nginx.repo
Add the following lines to file as per your distribution.
--------------- On CentOS 7 --------------- [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/7/$basearch/ gpgcheck=0 enabled=1 --------------- On RHEL 7 --------------- [nginx] name=nginx repo baseurl=http://nginx.org/packages/rhel/7.x/$basearch/ gpgcheck=0 enabled=1
4. Once nginx repo has been added, you can install Nginx using yum package manager tool as shown.
# yum install nginx
Step 3: Installing MariaDB Database Server
5. To install latest version of MariaDB, we need to add the official MariaDB repository, create a file named /etc/yum.repos.d/mariadb.repo.
# vi /etc/yum.repos.d/mariadb.repo
Add the following lines to file as per your distribution.
--------------- On CentOS 7 --------------- [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.2/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 --------------- On RHEL 7 --------------- [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.2/rhel7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
6. Once MariaDB repo has been added, you can install MariaDB using yum package manager tool as shown.
# yum install MariaDB-client MariaDB-server
7. Afterwards, secure the database server installation using the script below. Set a root password and answer y and press [Enter] for the rest of the subsequent questions to disable remote root user login, remove anonymous-user accounts and test database which by default can be accessed by all users, even anonymous users.
# mysql_secure_installation
Read Also: 12 MySQL/MariaDB Security Best Practices for Linux
Step 4: Installing Multiple Versions of PHP
8. To install different versions of PHP for your projects, use yum-config-manager command to install multiple versions of PHP along with most required modules as shown.
Install PHP 7.1 Version
# yum-config-manager --enable remi-php71 [Default] # yum install php php-common php-fpm # yum install php-mysql php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-apc php-cli php-pear php-pdo
Install PHP 5.6 Version
# yum install php56 php56-php-common php56-php-fpm # yum install php56-php-mysql php56-php-pecl-memcache php56-php-pecl-memcached php56-php-gd php56-php-mbstring php56-php-mcrypt php56-php-xml php56-php-pecl-apc php56-php-cli php56-php-pear php56-php-pdo
9. Once installed PHP, you can use following command to check the default version of PHP used on your server.
# php -v
Step 5: Configuring PHP-FPM and PHP56-PHP-FPM
10. This is the most interesting part of this tutorial, it explains how you can actually run multiple PHP versions on your server. Here, you will configure the different versions of php-fpm that Nginx will work with. You should define the user/group of the FastCGI processes as well as the ports they will listen on.
These are the following two configuration files that you will going to edit.
- php-fpm (default 7.1) – /etc/php-fpm.d/www.conf
- php56-php-fpm – /opt/remi/php56/root/etc/php-fpm.d/www.conf
Open the files above, set the user/group of FastCGI processes.
# vi /etc/php-fpm.d/www.conf [PHP 7.1] # vi /opt/remi/php56/root/etc/php-fpm.d/www.conf [PHP 5.6]
The default values should be apache, change them to nginx as shown.
user = nginx group = nginx
11. Next, find the listen parameters, and define the address:port on which FastCGI requests will be received.
listen = 127.0.0.1:9000 [php-fpm] listen = 127.0.0.1:9001 [php56-php-fpm]
12. Once all the above configuration done, you need to start and enable Nginx, MariaDB and PHP-FPM to auto-start at system boot.
# systemctl enable nginx # systemctl start nginx # systemctl enable mariadb # systemctl start mariadb ---------------- PHP 7.1 ---------------- # systemctl enable php-fpm # systemctl start php-fpm ---------------- PHP 5.6 ---------------- # systemctl enable php56-php-fpm # systemctl start php56-php-fpm
Attention: In case you get any errors while starting the second instance of PHP, php56-php-fpm, a SELinux policy could be blocking it from starting. If SELinux is in enforcing mode, set it to permissive mode, then try starting the service once again.
# getenforce # setenforce 0
Step 6: Setup Websites with Permissions
13. At this point, you can now create the necessary directories for your websites under /var/www/html/. You also need to create directories to store logs as follows:
---------------- Website 1 ---------------- # mkdir -p /var/www/html/example1.com/ # mkdir -p /var/log/nginx/example1.com/ ---------------- Website 2 ---------------- # mkdir -p /var/www/html/example2.com/ # mkdir -p /var/log/nginx/example2.com/
14. Set the appropriate ownership permissions on all the directories.
---------------- Website 1 ---------------- # chown -R root:nginx /var/www/html/example1.com/ # chmod -R 755 /var/www/html/example1.com/ # chown -R root:nginx /var/log/nginx/example1.com/ # chmod -R 660 /var/log/nginx/example1.com/ ---------------- Website 2 ---------------- # chown -R root:nginx /var/www/html/example2.com/ # chmod -R 755 /var/www/html/example2.com/ # chown -R root:nginx /var/log/nginx/example2.com/ # chmod -R 660 /var/log/nginx/example2.com/
Step 7: Setup Nginx Server Blocks for Websites
15. Now configure how Nginx will process requests to your websites using the server block configuration files which should be located in /etc/nginx/conf.d/.
Create the configuration files for your websites ending with .conf extension.
# vi /etc/nginx/conf.d/example1.com.conf # vi /etc/nginx/conf.d/example2.com.conf
Then paste the following server block configurations in the respective files.
Website 1
server { listen 80; server_name example1.com www.example1.com; root /var/www/html/example1.com/; index index.php index.html index.htm; #charset koi8-r; access_log /var/log/nginx/example1.com/example1_access_log; error_log /var/log/nginx/example1.com/example1_error_log error; location / { try_files $uri $uri/ /index.php?$query_string; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { root /var/www/html/example1.com/; fastcgi_pass 127.0.0.1:9000; #set port for php-fpm to listen on fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include /etc/nginx/fastcgi_params; } } Website 2
server { listen 80; server_name example2.com www.example2.com; root /var/www/html/example2.com/; index index.php index.html index.htm; #charset koi8-r; access_log /var/log/nginx/example2.com/example2_access_log; error_log /var/log/nginx/example2.com/example2_error_log error; location / { try_files $uri $uri/ /index.php?$query_string; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { root /var/www/html/example2.com/; fastcgi_pass 127.0.0.1:9001; #set port for php56-php-fpm to listen on fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include /etc/nginx/fastcgi_params; } } 16. Make sure that you have the following line in the closing part of the http block in /etc/nginx/nginx.conf. It helps to include all configuration files inside the /etc/nginx/conf.d/ directory when Nginx is running.
include /etc/nginx/conf.d/*.conf;
Step 8: Testing Different PHP Versions
17. Finally, you need to test that your server is using the two versions of PHP. You can create a very basic info.php script in the document root directories of your websites as shown.
# echo "<?php phpinfo(); ?>" > /var/www/html/example1.com/info.php # echo "<?php phpinfo(); ?>" > /var/www/html/example2.com/info.php
18. To apply all the changes you have made above, you need to restart Nginx, php-fpm and php56-php-fpm. But you can first of all check that the Nginx configuration files for any syntax errors before doing so.
# nginx -t # systemctl restart nginx php-fpm php56-php-fpm
19. There is one other last thing to do, especially if you are running your server locally, you need to setup local DNS using /etc/hosts file as shown in the screen shot below.
192.168.56.10 example1.com example1 192.168.56.10 example2.com example2
20. Finally, open a web browser and type the following addresses to verify the versions of PHP installed on the system.
http://example1.com/index.php http://example2.com/index.php
That's It! Now you can deploy files and test websites with different PHP versions. If you have any additions to make or questions to put forward, make use of the comment form below.
Founder of Arththavial
Founder President, Intellectual Development Foundation
விதியில் இல்லாதது மதியில் தோன்றாது








