I have my domain uberabasites.com Now, I want to create teste.uberabasites.com
server { server_name uberabasites.com; listen 80; root /var/www/uberabasites.com/public_html; access_log /var/www/uberabasites.com/logs/access.log; error_log /var/www/uberabasites.com/logs/error.log; index index.html index.php; location / { try_files $uri $uri/ @rewrites; } location @rewrites { rewrite ^ /index.php last; } location ~* .(jpg|jpeg|gif|css|png|js|ico|html)$ { access_log off; expires max; } location ~ /.ht { deny all; } location ~ .php { fastcgi_index index.php; fastcgi_split_path_info ^(.+.php)(.*)$; include /etc/nginx/fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }
server { server_name teste.uberabasites.com; listen 80; root /var/www/teste.uberabasites.com/public_html; access_log /var/www/teste.uberabasites.com/logs/access.log; error_log /var/www/teste.uberabasites.com/logs/error.log; index index.html index.php; location / { try_files $uri $uri/ @rewrites; } location @rewrites { rewrite ^ /index.php last; } location ~* .(jpg|jpeg|gif|css|png|js|ico|html)$ { access_log off; expires max; } location ~ /.ht { deny all; } location ~ .php { fastcgi_index index.php; fastcgi_split_path_info ^(.+.php)(.*)$; include /etc/nginx/fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
The config looks proper to me, you just need to add a DNS record for the subdomain and you should be good to go: <br> <br>Type: A <br>Name: teste <br>Value: your droplet’s IP address