Create new ebsite with CLI

TheTechnoMan 6 років тому оновлений 6 років тому 24

there are already some commands available:

Could you add a command to create a website as well? The purpose for this are silent installations.

Thank you



You can create a website by using the import command.

You can create a website by using the import command.
Well that would be indeed a option. So i simply create the desired wbesite and then export the config, and import it when i need it?
Alright, antoher question. The first thing you have to do is that one:

"Enabling Ajenti V will overwrite configuration for the following software:
vsftpd, nginx"

Is there a way to also do that automatically?

Thank you
Yes, you need to deploy /etc/ajenti/vh.json file with your setup - that will enable Ajenti V automatically.
Okay thank you. And the last question: I have created 2 websites. The first one called "Main" should be the main one as the name says. That seems to work. But i also created a website "phpMyAdmin" which points to srv/phpMyAdmin, and i created a domain for it "pma.example.com". However when i try to access the domain it simply won't work (not resolvable). The domain "example.com" is pointing to the server's ip address. What could be the problem?

Many thanks
If your subdomain isn't resolvable, you need to set up a DNS record for it at your registrar's panel. Alternatively, setup a wildcard record for all possible subdomains.
Hmm, it's not a own domain. It's the default domain from the vserver. example: "vps123.ovh.net". Is there still a away to do that?
If your hoster provided this domain, it probably doesn't have any subdomain entries. You might try to ask hoster support if they could add a subdomain record for you.
Alright. Is there a way to simply access the second website (phpMyAdmin) like "example.com/phpMyAdmin"? It does not look so?
Yes, just add your phpMA content entries to the main website and use "/phpMyAdmin" URL pattern. You might also need to also add some custom configuration to deal with PHP redirects
Not sure if i understood you correctly, but i have added a new content entry to the "main" website with the name "phpMyAdmin" and the URL pattern "/phpMyAdmin". When I access "example.com/phpMyAdmin" i will get a blank page which says "File not found."

I have not touched the other website (phpMyAdmin). Did I something wrong? I mean, how does it know that it needs to server the data from the other website?

Thank you very much for your time.
You can remove the "subdomain" PMA site, as you won't be using it. You need to re-create your PMA content config under the "main" website now, while using a "/phpmyadmin" URL pattern.
You can just follow our phpMyAdmin tutorial, but use the new URL pattern. Also, you'll need to point custom path of the new content entry to PMA installation.
"You need to re-create your PMA content config under the "main" website" What do you mean with that? Do i still have 2 websites, or only the main? 
You can remove the "subdomain" PMA site
You only need one website (because it will be working at a single domain).
I just moved the phpmyadmin folder into the /srv/main directory and removed the custom path from the settings. Now I can access it, but the graphics won't load. They produce an "Access Denied" 

I can access it until i get to the /img directory, e.g.
http://XXX/phpMyAdmin/themes/pmahomme/ works
http://XXX/phpMyAdmin/themes/pmahomme/img - produces access denied

The permisisons are: www-data:www-data

Is that wrong? This permisisons got automatically assigned from Ajenti
They say something like_ 

Access to the script '/srv/main/phpMyAdmin/themes/pmahomme/screen.png' has been denied (see security.limit_extensions)" while reading response header from upstream
Well the problem was the "pattern" that you provided. You always need a pattern which only processed .php data thourgh the php-fpm, otherwise the above error occurs.