Your comments
I looked into your issue a little bit.
The way ajenti website creation works, it isn't possible. When you create a new page, you enter website name only (identificator), not server_name (domain), that is "example.com" by default. I could tell you, how to set server_name to website name and then add www to it automatically, though.
The way ajenti website creation works, it isn't possible. When you create a new page, you enter website name only (identificator), not server_name (domain), that is "example.com" by default. I could tell you, how to set server_name to website name and then add www to it automatically, though.
I have a solution for your suggestion number one:
I also highly recommend you to backup the original file in case you made a mistake like missing ', so you can revert it back.
Solution for suggestion number two is to edit the same file as above, and just 2 lines below we have
self.custom_conf = j.get('custom_conf', '').
Now, we can insert our custom-default conf here.
self.custom_conf = j.get('custom_conf', 'include /etc/nginx.templates.d/generic_vhost.conf;')
- Find file "api.py" (path /var/lib/ajenti/plugins/vh/api.py on my CentOS 6 system)
- Edit line 41, replace '/srv/new-website' with '/var/'+j['name'], so the whole line should look like this: self.root = j.get('root', '/var/'+j['name']) instead. (you can also modify it to your own needs. you can add +'/public_html' at the end of bracket, like this '/var/'+j['name']+'/public_html')
- Save file and restart Ajenti.
I also highly recommend you to backup the original file in case you made a mistake like missing ', so you can revert it back.
Solution for suggestion number two is to edit the same file as above, and just 2 lines below we have
self.custom_conf = j.get('custom_conf', '').
Now, we can insert our custom-default conf here.
self.custom_conf = j.get('custom_conf', 'include /etc/nginx.templates.d/generic_vhost.conf;')
Yeah, completely agree. I think that point 2 needs an extension though: For every file in /etc/nginx.templates.d/*.conf make a checkbox with filename as checkbox name. IE: I have files /etc/nginx.templates.d/wordpress.conf and /etc/nginx.templates.d/drupal.conf. Ajenti should create checkboxes "Wordpress" and "Drupal" (capitalize first letter).
Customer support service by UserEcho
- sudo systemctl restart nginx - CentOS 7, ArchLinux
- sudo service nginx restart - Ubuntu, Centos 6.x, Debian
If that doesn't work, check your configuration - If you have domain properly configured etc