• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

www doesn't work

Scheduled Pinned Locked Moved General Discussion
6 Posts 3 Posters 1.6k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • lombisiL Offline
    lombisiL Offline
    lombisi
    wrote on last edited by
    #1

    site.com - work
    www.site.com - dont work

    How do I solve this problem?

    1 Reply Last reply
    0
  • A Offline
    A Offline
    a_5mith
    wrote on last edited by a_5mith
    #2

    Redirect www. to site.com. They're two separate sub-domains, it's like expecting mail.site.com to redirect to site.com automatically.

    Are you using apache or nginx?

    lombisiL 1 Reply Last reply
    0
  • lombisiL Offline
    lombisiL Offline
    lombisi
    replied to a_5mith on last edited by
    #3

    @a_5mith Routing could not. Nginx.

    pichaliteP 1 Reply Last reply
    0
  • pichaliteP Offline
    pichaliteP Offline
    pichalite Plugin & Theme Dev
    replied to lombisi on last edited by
    #4

    @osman123 What's your nginx config for the routing?

    1 Reply Last reply
    0
  • lombisiL Offline
    lombisiL Offline
    lombisi
    wrote on last edited by
    #5

    server {
    listen 80;
    server_name site.com;
    location / {
    proxy_pass http://localhost:4567/;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    
        proxy_redirect off;
        proxy_buffering   off;
    
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
    

    }

    What should I do? 😞

    pichaliteP 1 Reply Last reply
    0
  • pichaliteP Offline
    pichaliteP Offline
    pichalite Plugin & Theme Dev
    replied to lombisi on last edited by
    #6

    @osman123 add this block to your nginx conf to redirect www.site.com to site.com

    server {
        listen       80;
        server_name  www.site.com;
        return       301 http://site.com$request_uri;
    }
    
    1 Reply Last reply
    1

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development