Replies: 1 comment
-
If i understood you problem you should set at least one with default_server or set server_name
And in the default you should do, all routes not matched the above server name will get in here.
I use like this, it get the subdomain and matches with a folder, on the second if none was match I go to default,
You can remove both if and use only it
And you can do it ( remove nginx default conf with default_server)
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys!
So I set up a webserver with Nginx on jelastic (laravel), and I can't get it to work properly.
When going to the main url, the frontpage works, but any other links or domain just gives 404 not found. So basically the index.php rerouting is not working.
Running phalcon 3.45 and Php 7.3 on the webserver.
I tried the original nginx config, then the frontpage works. If I try the Nginx settings from the documentation the webserver does not start at all...
Here is the original config from the webserver (only frontpage and main url working):
`#user nobody;
worker_processes auto;
worker_rlimit_nofile 2048;
#load_module modules/ngx_http_modsecurity_module.so;
error_log /var/log/nginx/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 2048;
}
http {
server_tokens off;
include mime.types;
default_type application/octet-stream;
client_max_body_size 100m;
include /etc/nginx/conf.d/*.conf;
}
`
Here is the server settings from the wiki. As mention, if I use this the webserver wont start/gives error.
https://docs.phalcon.io/3.4/en/webserver-setup
server { # Port 80 will require Nginx to be started with root permissions # Depending on how you install Nginx to use port 80 you will need # to start the server with
sudo` ports about 1000 do not require# root privileges
# listen 80;
}`
How can I combine this to get it to work?
Thank you!!!!!
Best Regards,
Johan
Beta Was this translation helpful? Give feedback.
All reactions