0
Answered

PHPMyAdmin Installation

Deleted-Account 10 ár síðan updated by wrrr 9 ár síðan 15
Yesterday I tried to install PHPMyAdmin, but if I type <mydomain>/phpmyadmin I am getting a NGINX 404 error. Any idea how to solve this, or maybe I have to do some extra configuration to make it work with ajenti?
Under review
I can't help you without knowing your configuration. Please post screenshots or /etc/ajenti/vh.json
Hi, thanks for the really fast reply! My vh.json:

{
"websites": [
{
"maintenance_mode": false,
"locations": [
{
"custom_conf_override": false,
"pattern": "/phpmyadmin",
"custom_conf": "",
"path": "/usr/share/phpmyadmin/",
"match": "exact",
"backend": {
"params": {
"autoindex": false
},
"type": "static"
}
}
],
"custom_conf": "",
"ssl_key_path": "",
"owner": "root",
"ssl_cert_path": "",
"name": "TITANWAR",
"enabled": true,
"extensions": {
"ajenti.plugins.vh.processes.ProcessesExtension": {
"processes": []
},
"ajenti.plugins.vh-mysql.mysql.MySQLExtension": {
"username": null,
"password": null,
"created": false,
"user": null,
"name": null
}
},
"domains": [
{
"domain": "titan-war.net"
}
],
"root": "/srv/titanwar",
"ports": [
{
"spdy": false,
"ssl": false,
"host": "*",
"port": 80,
"default": false
}
]
},
{
"maintenance_mode": true,
"locations": [],
"custom_conf": "",
"ssl_key_path": "",
"owner": "root",
"ssl_cert_path": "",
"name": "RECHSOFTWARE",
"enabled": true,
"extensions": {
"ajenti.plugins.vh.processes.ProcessesExtension": {
"processes": []
},
"ajenti.plugins.vh-mysql.mysql.MySQLExtension": {
"username": null,
"password": null,
"created": false,
"user": null,
"name": null
}
},
"domains": [
{
"domain": "rechsoftware.de"
}
],
"root": "/srv/rechsoftware",
"ports": [
{
"spdy": false,
"ssl": false,
"host": "*",
"port": 80,
"default": false
}
]
}
]
}
I can see two problems here:
first, you should be using "PHP" content type instead of "Static files" for PHPMyAdmin
second, you should set path of this content entry to /usr/share, because your URL prefix will be appended to it, giving you final path of /usr/share/phpmyadmin (see documentation for NGINX "root" directive)
Maybe I should add the comment that I want to access it over http://titan-war.net/phpmyadmin...
So, I did now change to PHP and /usr/share, but still facing some problems: 1.: If I type <domain>/phpmyadmin nothing happens, if I type <domain>/phpmyadmin/index.php I get on the start page but no images are displayed, the whole site looks very buggy. Again the vh.json: 

{
"websites": [
{
"maintenance_mode": false,
"locations": [
{
"custom_conf_override": false,
"pattern": "/phpmyadmin/",
"custom_conf": "",
"path": "/usr/share",
"match": "exact",
"backend": {
"params": {
"pm_min": null,
"pm_max": null,
"php_open_basedir": "/usr/share"
},
"type": "php-fcgi"
}
}
],
"custom_conf": "",
"ssl_key_path": "",
"owner": "root",
"ssl_cert_path": "",
"name": "TITANWAR",
"enabled": true,
"extensions": {
"ajenti.plugins.vh.processes.ProcessesExtension": {
"processes": []
},
"ajenti.plugins.vh-mysql.mysql.MySQLExtension": {
"username": null,
"password": null,
"created": false,
"user": null,
"name": null
}
},
"domains": [
{
"domain": "titan-war.net"
}
],
"root": "/srv/titanwar",
"ports": [
{
"spdy": false,
"ssl": false,
"host": "*",
"port": 80,
"default": false
}
]
},
{
"maintenance_mode": true,
"locations": [],
"custom_conf": "",
"ssl_key_path": "",
"owner": "root",
"ssl_cert_path": "",
"name": "RECHSOFTWARE",
"enabled": true,
"extensions": {
"ajenti.plugins.vh.processes.ProcessesExtension": {
"processes": []
},
"ajenti.plugins.vh-mysql.mysql.MySQLExtension": {
"username": null,
"password": null,
"created": false,
"user": null,
"name": null
}
},
"domains": [
{
"domain": "rechsoftware.de"
}
],
"root": "/srv/rechsoftware",
"ports": [
{
"spdy": false,
"ssl": false,
"host": "*",
"port": 80,
"default": false
}
]
}
]
}

Still thanks for your support, and still answering my nooby questions :D.
Can you please post the generated /etc/nginx/conf.d/titanwar.conf file?
I solved it. I apologize for my late reply.
+2
Hello,

Can you please let me know how you solved it and if you can post some phpmyadmin install steps.

You will help a lot of people.

Thanks,
Kick
+1
I have the same problem, how you fixed?
+2
Recently setup phpmyadmin with ajenti/NGINX and documented my steps. Follow these and you shouldn't have any issues:


Login to Ajenti (Ajenti-V needs to be installed) and create a new website.

  • Set name as phpmyadmin
  • Untick Maintenance mode
  • Set Path to /usr/share/phpmyadmin
  • Under 'ports' add host = * Port = 8001
  • Under 'content' create new PHP FastCGI
Save and test all works correctly at http://yourdomain.com:8001

If you recieve an error 'cannot start session without errors' run: chmod 777 /var/lib/php/session/
To avoid errors at setup is worth it to try this settings.

For production you should be good to go with standard settings (remove these)
Content > PHP > PHP.ini 

upload_max_filesize = 26M;
post_max_size = 26M;
fastcgi_connect_timeout 360;
fastcgi_send_timeout 250;
fastcgi_read_timeout 250;
Installation on my sub domain works good..... except at initial login the url is appended with port /:80 and I don't want this since I am resolving good on https/ssl.

When I first login the url is forced to be like this:

`https://pma.mydomain.com:80/index.php?token=xxxxxxxxxxx`

And page says "SSL Connection error"

So I go to `https://pma.mydomain.com` in same browser and I am logged in and working perfectly.

Searching in docs cannot find where I may control this behaviour.

thx

I apologize if this is not in the right area. If I should raise a new topic this can be deleted.

Fixed in config.inc.php

$cfg['ForceSSL'] = true;