By esultanzada
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
For online documentation and support please refer to nginx.org. Commercial support is available at nginx.com.
i need help to setup sub domain and create ftp user that able to upload.
i need this server for file hosting of my website that provide direct links for download. any suggestion?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
If your configuration looks like the one you posted:
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /var/www/dl.domain.com/public_html;
index index.html index.htm;
# Make site accessible from http://localhost/
188.27.10.28 dl.domain.com;
}
Then it’s not valid.
You can test your configuration with nginx -t.
After I tested your server block, I get the following error:
$ nginx -t
2015/04/22 00:26:32 [emerg] 145#0: unknown directive "188.27.10.28" in /etc/nginx/nginx.conf:39
nginx: [emerg] unknown directive "188.27.10.28" in /etc/nginx/nginx.conf:39
nginx: configuration file /etc/nginx/nginx.conf test failed
This means that the line 188.27.10.28 dl.domain.com; is not valid. You can remove it or comment it out.
After this reload nginx with nginx reload and try it again.
I keep my fingers crossed that it works for you!
Try changing your listen and server_name directives to:
listen 80 default_server;
server_name _;
This tells nginx to make your server block the default and respond if no other block matches the Host header. Earlier it would respond only to Host: example.com as defined in the tutorial.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.