How to send plain text response from Nginx

You can use a return statement in Nginx to send a plain text response.

In your Nginx server entry, add

Now you can access the page with the URL

Here is another example

For any URL starting with /hello, you get the “Hello World” response.

Back to Nginx

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *