We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Subdomain Working but with two error
Subdomain Working but with two error
Hello,
I see many people speak about to access with a subdomain.
I made a working solution :
- Register a new domain : panel.domain.com
- Modify the config file to have :
all is working but when a create or deleted a domain have an error :
- Created : Error: Web domain xxxxxxxxx.com exist
The domaine is well create but it return the error.
- Deleted : ERR_CONNECTION_CLOSED
I used MyVesta fork by dpeca
Config :
- Debian 10
- Ryzen 7 3800
- 4Gb Ram
Thanks for you help
I see many people speak about to access with a subdomain.
I made a working solution :
- Register a new domain : panel.domain.com
- Modify the config file to have :
Code: Select all
location / {
proxy_pass https://XX.XX.XX.XX:8083;
}
- Created : Error: Web domain xxxxxxxxx.com exist
The domaine is well create but it return the error.
- Deleted : ERR_CONNECTION_CLOSED
I used MyVesta fork by dpeca
Config :
- Debian 10
- Ryzen 7 3800
- 4Gb Ram
Thanks for you help
Re: Subdomain Working but with two error
You are doing something wrong since you are modifying nginx conf, which you never should do, because soon or later it will overwriten with template.
Please describe what you are trying to do.
Subdomain will works if you add it the same way you are adding main domain.
Please describe what you are trying to do.
Subdomain will works if you add it the same way you are adding main domain.
Re: Subdomain Working but with two error
Yes, I understand,
I modified the file in /home/admin/conf/web
panel.domain.com.nginx.ssl.conf
Original:
Modified:
The goal is to be able to access the panel when I do panel.domain.com.
I modified the file in /home/admin/conf/web
panel.domain.com.nginx.ssl.conf
Original:
Code: Select all
location/ {
proxy_pass https://XX.XX.XX.XX:8443;
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|ttf|otf|webp|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|t$
root /home/admin/web/valentindoche.com/public_html;
access_log /var/log/apache2/domains/domain.com.log combined;
access_log /var/log/apache2/domains/domain.com.bytes bytes;
expires max;
# try_files $uri @fallback;
}
}
Code: Select all
location / {
proxy_pass https://XX.XX.XX.XX:8083;
}
Re: Subdomain Working but with two error
create /usr/local/vesta/data/templates/web/nginx/vesta.stpl
create /usr/local/vesta/data/templates/web/nginx/vesta.tpl
then assign vesta nginx template to your panel subdomain.
Code: Select all
server {
listen %ip%:%proxy_ssl_port% http2;
server_name %domain_idn% %alias_idn%;
# ssl on;
ssl_certificate %ssl_pem%;
ssl_certificate_key %ssl_key%;
error_log /var/log/%web_system%/domains/%domain%.error.log error;
access_log /var/log/%web_system%/domains/%domain%.log combined;
location / {
proxy_pass https://%ip%:8083;
}
location /webmail {
disable_symlinks off;
proxy_pass https://%ip%:%web_ssl_port%;
location ~* ^.+\.(%proxy_extentions%)$ {
root /var/lib/roundcube;
access_log /var/log/%web_system%/domains/%domain%.log combined;
access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
expires max;
# try_files $uri @fallback;
}
}
location /phpmyadmin {
disable_symlinks off;
proxy_pass https://%ip%:%web_ssl_port%;
location ~* ^.+\.(%proxy_extentions%)$ {
root /usr/share;
access_log /var/log/%web_system%/domains/%domain%.log combined;
access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
expires max;
# try_files $uri @fallback;
}
}
location /phpmyadmin/ {
proxy_pass https://%ip%:%web_ssl_port%;
}
location ~ /\.ht {return 404;}
location ~ /\.svn/ {return 404;}
location ~ /\.git/ {return 404;}
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
disable_symlinks if_not_owner from=%docroot%;
include %home%/%user%/conf/web/snginx.%domain_idn%.conf*;
}
Code: Select all
server {
listen %ip%:%proxy_port%;
server_name %domain_idn% %alias_idn%;
location / {
rewrite ^(.*) https://%domain_idn%$1 permanent;
}
include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
}
Re: Subdomain Working but with two error
Hello,
I have always the same error :
I have always the same error :
- When i create a domainWhen i create a domain :
The panel say : Error: Web Domain domain.com exist
In error log i have nothing and i access log i have :Code: Select all
XX.XX.XX.XX - - [12/Jun/2020:14:31:11 +0200] "POST /add/web/ HTTP/2.0" 200 4013 "https://panel.domain.dev/add/web/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36" XX.XX.XX.XX - - [12/Jun/2020:14:31:11 +0200] "GET /js/i18n.js.php?1491697868 HTTP/2.0" 200 977 "https://panel.domain.dev/add/web/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"
Re: Subdomain Working but with two error
maybe you really have that domain already added?
Re: Subdomain Working but with two error
I roll my head on the keyboard :
jhdfcgsdjdfhsgdfhjksdg
dshjdsdhsd
jhdfcgsdjdfhsgdfhjksdg
dshjdsdhsd
Re: Subdomain Working but with two error
or maybe modifications that you made in nginx conf files makes some conflict?
try to rebuild configs:
try to rebuild configs:
Code: Select all
for user in $(grep '@' /etc/passwd |cut -f1 -d:); do
if [ ! -f "/usr/local/vesta/data/users/$user/user.conf" ]; then
continue;
fi
v-rebuild-web-domains $user 'no'
done
service nginx restart
service apache2 restart
Re: Subdomain Working but with two error
or maybe panel.domain.com is added as alias?
Re: Subdomain Working but with two error
Code: Select all
-bash: v-rebuild-web-domains: command not found