Angelino Posted October 21, 2024 Posted October 21, 2024 I got a website like www.example.com/nl/ also on /en/ /fr/. Now if i'm in processwire making my content and want to see my preview on the SAVE button like save + view then the preview jumps to https://default/nl/....../ and not my domainname? My main language is /nl/ ofcourse. Anything i missed in the settings? I set my $config->httpHosts already filled in my domains.
Angelino Posted October 21, 2024 Author Posted October 21, 2024 My apologies; there was a misconfiguration in my Nginx settings: server_name default; I changed it on the server to the correct domain: server_name example.com www.example.com; Now it works, and previews from ProcessWire are directed to the correct URL.
Alpina Posted October 21, 2024 Posted October 21, 2024 Hi @Angelinowould you mind to share your Nginx conf? I would like to try Nginx with PW, but I'm not sure if it would work flawless.
Angelino Posted October 24, 2024 Author Posted October 24, 2024 @Alpina Here is my `nginx.conf`file: server { listen 80; server_name default; # Here you need to change default with your site root /var/www/html; # Ensure this path is correct and points to the ProcessWire files index index.php index.html index.htm; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { include fastcgi_params; fastcgi_pass php:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } location ~ /\.ht { deny all; } } and my compose.yml nginx nginx: container_name: nginx image: nginx:alpine ports: - "80:80" volumes: - ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf - ../code/:/var/www/html # here is ../code my root folder depends_on: - php - mysql networks: - boilerplate # this is custom, your network need to come here 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now