[emerg] unexpected end of file, expecting ";" or "}" in /usr/local/directadmin/data/users/admin/nginx.conf

viera

New member
Joined
Jan 16, 2022
Messages
4
hi
i installed directadmin 1.63.9 on ubuntu 20.04
when i change webserver to nginx_apache this error show:
Restarting nginx.
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.

after nginx -t command show :
nginx: [emerg] unexpected end of file, expecting ";" or "}" in /usr/local/directadmin/data/users/admin/nginx.conf:14
nginx: configuration file /etc/nginx/nginx.conf test failed

and content of /usr/local/directadmin/data/users/admin/nginx.conf is :
GNU nano 4.8 /usr/local/directadmin/data/users/admin/nginx.conf
# Auto generated nginx config file by DirectAdmin version 1.63.9
# Modifying this file is not recommended as any changes you make will be
# overwritten when the user makes any changes to their website

# For global config changes that affect all Users, see this guide:
# http://help.directadmin.com/item.php?id=558
# For local config changes that only affect one User, see this guide:
# http://help.directadmin.com/item.php?id=3

# Frontpage requires these parameters in every httpd.conf file or else
# it won't work.
ServerRoot /etc/httpd

when i remove : ServerRoot /etc/httpd , result of nginx -t show :
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
but when i reboot server above problem show again

please help me . thanks
 
my problem solved in:

add frontpage_on=0 to /usr/local/directadmin/conf/directadmin.conf
then
./build nginx_apache
 
Back
Top