Is there a way to edit Nginx.conf?

hi, is there any way that i can edit root nginx.conf ( root nginx.conf file: /etc/nginx/nginx.conf ) file for my website… i need to place some rewrite rules for the links of my website

Thanks

Our hosting, like most web hosting services, are shared hosting. That means you get an account on a server shared with many other people. That’s why you cannot access the root configuration files: doing so would allow you to manipulate (i.e. break) the websites of other users, which is not something anyone wants.

However, we use Apache in addition to NGINX, which means you can use .htaccess rule to rewrite URLs on your website, like you could with any other Apache server.

but the template i’m using requires only nginx need to be edited…:sweat_smile:

okay anyway thanks for the reply!

The script you’re using only works with NGINX? It doesn’t have a .htaccess for Apache as well? That’s the first time I’ve seen that! Most software can work fine with either web server, and they provide configuration samples for both Apache and NGINX.

sorry for the late reply!

yes the template i’m using needs both nginx rewrite and htacess rewrite.

in that template already the developer have rewrited htacess, and he mentioned that also nginx to be rewrited by me for working of template.

this is the image of developer asking to edit nginx.conf

In the installation instructions, I see:

However if your server is using Nginx

Which I think means: “If you use Apache, you’re all done, because of the .htaccess file already there. If you’re using Nginx, you need to edit your Nginx config to make your website work, because Nginx doesn’t understand .htaccess rules”.

Using Apache and Nginx at the same time is quite uncommon. Usually, people just use one of the two, and the developer has instructions for both of those groups. But I don’t see any reason (both from the instructions and from personal experience) to assume that both, rather than just one of the two, configurations need to be edited.


I don’t think we’re going to get anywhere just going back and forth with this.

Did you actually try to open your website with only the .htaccess rules? Did it work? If not, what did you see?

yes actuall it was a code issue, but i thought it was nginx.conf issue. i rectified it now the site is working great!!..

and i have another doubt can i integrate free cloudfare ssl in to my free hosting plan and i use custom domain and not free domain from infinity?

if yes can you tell me how? i tried but it was unsucessfull. a popup from infinity showing that domain name is wrong for the certificate. but the domain name was correct.

thanks,

If you’re using Cloudflare, then Cloudflare already provides you with a valid SSL certificate. You don’t need an extra SSL certificate when you’re using Cloudflare

  1. https://infinityfree.net/support/add-your-own-domain/
    https://infinityfree.net/support/why-doesnt-my-domain-work/

if you use WordPress skip part 4 and use W

  1. add your domain to Cloudflare https://www.cloudflare.com/
    and follow the instructions on changing the NS

  2. wait

  3. cloudflare crypto section > select ssl = FULL

  4. Always use HTTPS = ON
    Automatic HTTPS Rewrites = ON (if necessary - depending on your code)
    after that Caching section = purge all



W. make sure you update your Website URL in the WordPress settings first.

image

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.