Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Database Server
  • Search

[GUIDE] How to replace phpMyAdmin by Adminer in Ubuntu 16.04 NGINX php-fpm

Questions regarding the Database Server
MySQL, PostgreSQL, MariaDB, Percona Server, phpMyAdmin, phpPgAdmin
Post Reply
  • Print view
Advanced search
23 posts
  • Previous
  • 1
  • 2
  • 3
gregorio
Posts: 8
Joined: Thu Apr 16, 2020 9:03 pm

Os: CentOS 6x
Web: nginx + php-fpm
Re: [GUIDE] How to replace phpMyAdmin by Adminer in Ubuntu 16.04 NGINX php-fpm
  • Quote

Post by gregorio » Sat Apr 18, 2020 2:50 pm

Any idea on how to force adminer to work only on HTTPS?
Top

Spheerys
Posts: 225
Joined: Tue Dec 29, 2015 12:36 pm

Os: Debian 7x
Web: apache + nginx
Re: [GUIDE] How to replace phpMyAdmin by Adminer in Ubuntu 16.04 NGINX php-fpm
  • Quote

Post by Spheerys » Sat Apr 18, 2020 2:59 pm

I'm also interested !
I thought a simple .htaccess like this :

Code: Select all

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{HTTPS} off [OR]
  RewriteCond %{HTTP_HOST} ^www\.
  RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$
  RewriteRule ^ https://%1%{REQUEST_URI} [NE,L,R=301]
</IfModule>
... on /usr/share/phpmyadmin/ (because I didn't changed the original path) should do the work, but no...
Top

gregorio
Posts: 8
Joined: Thu Apr 16, 2020 9:03 pm

Os: CentOS 6x
Web: nginx + php-fpm
Re: [GUIDE] How to replace phpMyAdmin by Adminer in Ubuntu 16.04 NGINX php-fpm
  • Quote

Post by gregorio » Fri May 22, 2020 7:58 pm

.htaccess doens't work because the webserver that serves adminer is nginx.

I've found another way, you have modify the file:

Code: Select all

/etc/nginx/conf.d/phpmyadmin.inc
Adding these lines at line #3:

Code: Select all

    if ($server_port = 80) {
        rewrite ^ https://$host$request_uri permanent;
    }
Then restart the webserver.
Top


Post Reply
  • Print view

23 posts
  • Previous
  • 1
  • 2
  • 3

Return to “Database Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

cron

Login  •  Register

I forgot my password