Hello guys,
I'm new to nginx and still trying to figure out how the things happens.
From more than a week I'm reading articles, watching videos and still can't fix my problem.
I'll be glad if someone help me a little.
My confing is windows server 2012, MYSQL, NGINX, PHP and phpMyAdmin.
This is my nginx conf file:
listen 8080;
server_name 192.168.200.95;
location / {
root html;
index index.html index.htm index.php /_h5ai/server/php/index.php;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ .php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
# phpmyadmin on port 81
server {
listen 81;
server_name localhost;
root phpmyadmin;
index index.php /_h5ai/server/php/index.php;
if (!-e $request_filename) {
rewrite ^/(.+)$ /index.php?url=$1 last;
break;
}
location ~ .php$ {
#root phpmyadmin;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
# phpmyadmin end
When I enter "192.168.200.95:8080/site" in my browser everything works fine, but I want to reach my site without using the port. I have tried using proxy_pass , but without success.
Thank you in advance!
I'm new to nginx and still trying to figure out how the things happens.
From more than a week I'm reading articles, watching videos and still can't fix my problem.
I'll be glad if someone help me a little.
My confing is windows server 2012, MYSQL, NGINX, PHP and phpMyAdmin.
This is my nginx conf file:
listen 8080;
server_name 192.168.200.95;
location / {
root html;
index index.html index.htm index.php /_h5ai/server/php/index.php;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ .php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
# phpmyadmin on port 81
server {
listen 81;
server_name localhost;
root phpmyadmin;
index index.php /_h5ai/server/php/index.php;
if (!-e $request_filename) {
rewrite ^/(.+)$ /index.php?url=$1 last;
break;
}
location ~ .php$ {
#root phpmyadmin;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
# phpmyadmin end
When I enter "192.168.200.95:8080/site" in my browser everything works fine, but I want to reach my site without using the port. I have tried using proxy_pass , but without success.
Thank you in advance!