Having Trouble Setting Subdomains On NGINXBlank Page: wordpress on nginx+php-fpmNginx gives 504 Gateway Time-out once moved to livephpmyadmin having problems on nginx and php-fpm on RHEL 6Nginx subversion commit failureNGINX don't parse .php5 as .phpLaravel 4.1 on nginx routes error 404nginx rewrite throw 404 with last and breakNginX + WordPress + SSL + non-www + W3TC vhost config file questionsnginx PHP files downloading instead of executingCodeIgniter nginx rewrite rules for i8ln URL's

Why are solar panels kept tilted?

As programers say: Strive to be lazy

Why is tomato paste so cheap?

What's tha name for when you write multiple voices on same staff? And are there any cons?

Jumping frame contents with beamer and pgfplots

Area under the curve - Integrals (Antiderivatives)

On what legal basis did the UK remove the 'European Union' from its passport?

Why do the lights go out when someone enters the dining room on this ship?

What is the name of this Middle English letter?

How can a layman easily get the consensus view of what academia *thinks* about a subject?

When a land becomes a creature, is it untapped?

Finite Euclidean domain that is not field?

Will a coyote attack my dog on a leash while I'm on a hiking trail?

what does a native speaker say when he wanted to leave his work?

How can I answer high-school writing prompts without sounding weird and fake?

Smallest Guaranteed hash collision cycle length

On studying Computer Science vs. Software Engineering to become a proficient coder

Why does the headset man not get on the tractor?

Non-deterministic Finite Automata | Sipser Example 1.16

How much Replacement does this axiom provide?

correct spelling of "carruffel" (fuzz, hustle, all that jazz)

Does Lawful Interception of 4G / the proposed 5G provide a back door for hackers as well?

using `is` operator with value type tuples gives error

Can someone explain homicide-related death rates?



Having Trouble Setting Subdomains On NGINX


Blank Page: wordpress on nginx+php-fpmNginx gives 504 Gateway Time-out once moved to livephpmyadmin having problems on nginx and php-fpm on RHEL 6Nginx subversion commit failureNGINX don't parse .php5 as .phpLaravel 4.1 on nginx routes error 404nginx rewrite throw 404 with last and breakNginX + WordPress + SSL + non-www + W3TC vhost config file questionsnginx PHP files downloading instead of executingCodeIgniter nginx rewrite rules for i8ln URL's






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








-1















I'm currently setting up OpenMediaVault on my Rock64 Single Board PC which is based off Debian and is configured through the web GUI running from NGINX on port 80.



I'm currently trying to install Nextcloud using NGINX, MariaDB/MySQL and PHPMyAdmin, and originally I was hoping to use Docker to install and manage them all. Unfortunately I've had nothing but problems so I reverted to installing the software from the Linux repository.



I have successfully setup a MySQL server with a user and database ready for Nextcloud and have managed to get PHPMyAdmin working on a different port 8080.



Instead of using ports I would like to use subdomains but I can't seem to get them to work. So far I have set the root directories as the following:-



/var/www/openmediavault
/var/www/phpmyadmin
/var/www/nextcloud


I would like the following subdomains:- N.B I will setup SSL at a later date once I take this over a WAN.




  • http://rock64.lan (default OpenMediaVault web GUI)


  • http://phpmyadmin.rock64.lan (PHPMyAdmin GUI for MySQL)


  • http://nextcloud.rock64.lan (Nextcloud web GUI)

My NGINX is configured to use
/etc/nginx/sites-available
and
/etc/nginx/sites-enabled



The following symbolic links will be used with respective names:-



ln -s /etc/nginx/sites-available/openmediavault-webgui /etc/nginx/sites-enabled/openmediavault-webgui
ln -s /etc/nginx/sites-available/phpmyadmin /etc/nginx/sites-enabled/phpmyadmin
ln -s /etc/nginx/sites-available/nextcloud /etc/nginx/sites-enabled/nextcloud


This is the conetents of the openmediavault-webgui file



server images)/ 
expires 2d;

location /favicon
expires 14d;

location ~ .php$
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm-openmediavault-webgui.sock;
fastcgi_index index.php;
fastcgi_read_timeout 60s;
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

listen 80 default_server;
include /etc/nginx/openmediavault-webgui.d/*.conf;



I also have a symbolic link from PHPMyAdmin's location to www directory



ln -s /usr/share/phpmyadmin /var/www/phpmyadmin



Many thanks



Will



UPDATE 10:18 03/06/2019
Here is the server block for /etc/nginx/sites-enabled/phpmyadmin

server
listen 80;
root /var/www/phpmyadmin;
index index.php;
server_name phpmyadmin.rock64.lan;
location /
try_files $uri $uri/ =404;

location ~ .php
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7-0.fpm.sock;
fastcgi_index index.php;




UPDATE 11:25 03/06/2019
After configuring my OpenWrt router I can do a DNS lookup and http://phpmyadmin.rock64.lan is pointing to the correct IP address. However, I'm getting 502 Bad Gateway. One forum I came across mentioned setting the ownership and permissions. I've had play around with them but no change.



Under /etc/php/7.0/fpm/pool.d/ I have:



[openmediavault-webgui]
user = openmediavault-webgui
group = openmediavault-webgui

listen = /var/run/php-fpm-openmediavault-webgui.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0600

pm = ondemand
pm.max_children = 25
pm.process_idle_timeout = 10s

chdir = /

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; openmediavault php.ini settings ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Paths and Directories
php_value[include_path] = ".:/usr/share/php:/var/www/openmediavault"

; Pam Authentication Support (see /etc/pam.d)
php_value[pam.servicename] = "openmediavault-webgui";

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
php_value[upload_max_filesize] = 25M

; Maximum size of POST data that PHP will accept.
; http://php.net/post-max-size
php_value[post_max_size] = 25M

; Do not expose to the world that PHP is installed on the server.
; http://php.net/expose-php
php_value[expose_php] = Off

; Name of the session (used as cookie name).
; http://php.net/session.name
php_value[session.name] = X-OPENMEDIAVAULT-SESSIONID

; Default timeout for socket based streams (seconds)
; http://php.net/default-socket-timeout
php_value[default_socket_timeout] = 90

; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
php_value[max_execution_time] = 90


UPDATE 09/05/2019
I have now registered the FQDN as phpmyadmin.rock64.test to eliminate any conflicts and this is registered in my OpenWrt router's DNS. I can ping the domain name and I get reply back from the statically assigned IP address (192.168.1.123) I have linked to the LAN hostname. For other testing purposes I have assigned port 8080 but neither the FQDN or accessing via http://192.168.1.123:8080 works and still results in a bad gateway 502.



server 
listen 8080;
root /var/www/phpmyadmin;
index index.php index.html index.htm;
server_name phpmyadmin.rock64.test;
server_tokens off;
location ~ .php$
try_files $uri +404;
# include snippets/fastcgi-php.conf;
include /etc/nginx/fastcgi.conf;
include /etc/nginx/fastcgi_params;
# fastcgi_pass unix:/var/run/php/php7-0.fpm.sock;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;

location ~ /.
access_log off;
log_not_found off;
deny all;












share|improve this question
























  • Do not use arbritrary TLD such as .lan as you are exposing yourself to collisions. Use either the names that are defined for that purpose (see RFC2606 but typically .example or .test) or create a true domain name, in any existing TLD and then use internally as a suffix for all names.

    – Patrick Mevzek
    May 3 at 16:38











  • @PatrickMevzek I have changed to the .local TLD which the system OMV (Debian) uses by default. I will need to update my router's DNS table like before. I will post back with an update once I've tested.

    – willowen100
    May 4 at 7:52











  • .local is used by mDNS (multicast DNS) so it is fine if you are absolutely sure no devices on your network use that protocol. Otherwise, you need another one if you want to avoid clashes.

    – Patrick Mevzek
    May 5 at 15:20

















-1















I'm currently setting up OpenMediaVault on my Rock64 Single Board PC which is based off Debian and is configured through the web GUI running from NGINX on port 80.



I'm currently trying to install Nextcloud using NGINX, MariaDB/MySQL and PHPMyAdmin, and originally I was hoping to use Docker to install and manage them all. Unfortunately I've had nothing but problems so I reverted to installing the software from the Linux repository.



I have successfully setup a MySQL server with a user and database ready for Nextcloud and have managed to get PHPMyAdmin working on a different port 8080.



Instead of using ports I would like to use subdomains but I can't seem to get them to work. So far I have set the root directories as the following:-



/var/www/openmediavault
/var/www/phpmyadmin
/var/www/nextcloud


I would like the following subdomains:- N.B I will setup SSL at a later date once I take this over a WAN.




  • http://rock64.lan (default OpenMediaVault web GUI)


  • http://phpmyadmin.rock64.lan (PHPMyAdmin GUI for MySQL)


  • http://nextcloud.rock64.lan (Nextcloud web GUI)

My NGINX is configured to use
/etc/nginx/sites-available
and
/etc/nginx/sites-enabled



The following symbolic links will be used with respective names:-



ln -s /etc/nginx/sites-available/openmediavault-webgui /etc/nginx/sites-enabled/openmediavault-webgui
ln -s /etc/nginx/sites-available/phpmyadmin /etc/nginx/sites-enabled/phpmyadmin
ln -s /etc/nginx/sites-available/nextcloud /etc/nginx/sites-enabled/nextcloud


This is the conetents of the openmediavault-webgui file



server images)/ 
expires 2d;

location /favicon
expires 14d;

location ~ .php$
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm-openmediavault-webgui.sock;
fastcgi_index index.php;
fastcgi_read_timeout 60s;
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

listen 80 default_server;
include /etc/nginx/openmediavault-webgui.d/*.conf;



I also have a symbolic link from PHPMyAdmin's location to www directory



ln -s /usr/share/phpmyadmin /var/www/phpmyadmin



Many thanks



Will



UPDATE 10:18 03/06/2019
Here is the server block for /etc/nginx/sites-enabled/phpmyadmin

server
listen 80;
root /var/www/phpmyadmin;
index index.php;
server_name phpmyadmin.rock64.lan;
location /
try_files $uri $uri/ =404;

location ~ .php
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7-0.fpm.sock;
fastcgi_index index.php;




UPDATE 11:25 03/06/2019
After configuring my OpenWrt router I can do a DNS lookup and http://phpmyadmin.rock64.lan is pointing to the correct IP address. However, I'm getting 502 Bad Gateway. One forum I came across mentioned setting the ownership and permissions. I've had play around with them but no change.



Under /etc/php/7.0/fpm/pool.d/ I have:



[openmediavault-webgui]
user = openmediavault-webgui
group = openmediavault-webgui

listen = /var/run/php-fpm-openmediavault-webgui.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0600

pm = ondemand
pm.max_children = 25
pm.process_idle_timeout = 10s

chdir = /

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; openmediavault php.ini settings ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Paths and Directories
php_value[include_path] = ".:/usr/share/php:/var/www/openmediavault"

; Pam Authentication Support (see /etc/pam.d)
php_value[pam.servicename] = "openmediavault-webgui";

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
php_value[upload_max_filesize] = 25M

; Maximum size of POST data that PHP will accept.
; http://php.net/post-max-size
php_value[post_max_size] = 25M

; Do not expose to the world that PHP is installed on the server.
; http://php.net/expose-php
php_value[expose_php] = Off

; Name of the session (used as cookie name).
; http://php.net/session.name
php_value[session.name] = X-OPENMEDIAVAULT-SESSIONID

; Default timeout for socket based streams (seconds)
; http://php.net/default-socket-timeout
php_value[default_socket_timeout] = 90

; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
php_value[max_execution_time] = 90


UPDATE 09/05/2019
I have now registered the FQDN as phpmyadmin.rock64.test to eliminate any conflicts and this is registered in my OpenWrt router's DNS. I can ping the domain name and I get reply back from the statically assigned IP address (192.168.1.123) I have linked to the LAN hostname. For other testing purposes I have assigned port 8080 but neither the FQDN or accessing via http://192.168.1.123:8080 works and still results in a bad gateway 502.



server 
listen 8080;
root /var/www/phpmyadmin;
index index.php index.html index.htm;
server_name phpmyadmin.rock64.test;
server_tokens off;
location ~ .php$
try_files $uri +404;
# include snippets/fastcgi-php.conf;
include /etc/nginx/fastcgi.conf;
include /etc/nginx/fastcgi_params;
# fastcgi_pass unix:/var/run/php/php7-0.fpm.sock;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;

location ~ /.
access_log off;
log_not_found off;
deny all;












share|improve this question
























  • Do not use arbritrary TLD such as .lan as you are exposing yourself to collisions. Use either the names that are defined for that purpose (see RFC2606 but typically .example or .test) or create a true domain name, in any existing TLD and then use internally as a suffix for all names.

    – Patrick Mevzek
    May 3 at 16:38











  • @PatrickMevzek I have changed to the .local TLD which the system OMV (Debian) uses by default. I will need to update my router's DNS table like before. I will post back with an update once I've tested.

    – willowen100
    May 4 at 7:52











  • .local is used by mDNS (multicast DNS) so it is fine if you are absolutely sure no devices on your network use that protocol. Otherwise, you need another one if you want to avoid clashes.

    – Patrick Mevzek
    May 5 at 15:20













-1












-1








-1








I'm currently setting up OpenMediaVault on my Rock64 Single Board PC which is based off Debian and is configured through the web GUI running from NGINX on port 80.



I'm currently trying to install Nextcloud using NGINX, MariaDB/MySQL and PHPMyAdmin, and originally I was hoping to use Docker to install and manage them all. Unfortunately I've had nothing but problems so I reverted to installing the software from the Linux repository.



I have successfully setup a MySQL server with a user and database ready for Nextcloud and have managed to get PHPMyAdmin working on a different port 8080.



Instead of using ports I would like to use subdomains but I can't seem to get them to work. So far I have set the root directories as the following:-



/var/www/openmediavault
/var/www/phpmyadmin
/var/www/nextcloud


I would like the following subdomains:- N.B I will setup SSL at a later date once I take this over a WAN.




  • http://rock64.lan (default OpenMediaVault web GUI)


  • http://phpmyadmin.rock64.lan (PHPMyAdmin GUI for MySQL)


  • http://nextcloud.rock64.lan (Nextcloud web GUI)

My NGINX is configured to use
/etc/nginx/sites-available
and
/etc/nginx/sites-enabled



The following symbolic links will be used with respective names:-



ln -s /etc/nginx/sites-available/openmediavault-webgui /etc/nginx/sites-enabled/openmediavault-webgui
ln -s /etc/nginx/sites-available/phpmyadmin /etc/nginx/sites-enabled/phpmyadmin
ln -s /etc/nginx/sites-available/nextcloud /etc/nginx/sites-enabled/nextcloud


This is the conetents of the openmediavault-webgui file



server images)/ 
expires 2d;

location /favicon
expires 14d;

location ~ .php$
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm-openmediavault-webgui.sock;
fastcgi_index index.php;
fastcgi_read_timeout 60s;
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

listen 80 default_server;
include /etc/nginx/openmediavault-webgui.d/*.conf;



I also have a symbolic link from PHPMyAdmin's location to www directory



ln -s /usr/share/phpmyadmin /var/www/phpmyadmin



Many thanks



Will



UPDATE 10:18 03/06/2019
Here is the server block for /etc/nginx/sites-enabled/phpmyadmin

server
listen 80;
root /var/www/phpmyadmin;
index index.php;
server_name phpmyadmin.rock64.lan;
location /
try_files $uri $uri/ =404;

location ~ .php
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7-0.fpm.sock;
fastcgi_index index.php;




UPDATE 11:25 03/06/2019
After configuring my OpenWrt router I can do a DNS lookup and http://phpmyadmin.rock64.lan is pointing to the correct IP address. However, I'm getting 502 Bad Gateway. One forum I came across mentioned setting the ownership and permissions. I've had play around with them but no change.



Under /etc/php/7.0/fpm/pool.d/ I have:



[openmediavault-webgui]
user = openmediavault-webgui
group = openmediavault-webgui

listen = /var/run/php-fpm-openmediavault-webgui.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0600

pm = ondemand
pm.max_children = 25
pm.process_idle_timeout = 10s

chdir = /

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; openmediavault php.ini settings ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Paths and Directories
php_value[include_path] = ".:/usr/share/php:/var/www/openmediavault"

; Pam Authentication Support (see /etc/pam.d)
php_value[pam.servicename] = "openmediavault-webgui";

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
php_value[upload_max_filesize] = 25M

; Maximum size of POST data that PHP will accept.
; http://php.net/post-max-size
php_value[post_max_size] = 25M

; Do not expose to the world that PHP is installed on the server.
; http://php.net/expose-php
php_value[expose_php] = Off

; Name of the session (used as cookie name).
; http://php.net/session.name
php_value[session.name] = X-OPENMEDIAVAULT-SESSIONID

; Default timeout for socket based streams (seconds)
; http://php.net/default-socket-timeout
php_value[default_socket_timeout] = 90

; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
php_value[max_execution_time] = 90


UPDATE 09/05/2019
I have now registered the FQDN as phpmyadmin.rock64.test to eliminate any conflicts and this is registered in my OpenWrt router's DNS. I can ping the domain name and I get reply back from the statically assigned IP address (192.168.1.123) I have linked to the LAN hostname. For other testing purposes I have assigned port 8080 but neither the FQDN or accessing via http://192.168.1.123:8080 works and still results in a bad gateway 502.



server 
listen 8080;
root /var/www/phpmyadmin;
index index.php index.html index.htm;
server_name phpmyadmin.rock64.test;
server_tokens off;
location ~ .php$
try_files $uri +404;
# include snippets/fastcgi-php.conf;
include /etc/nginx/fastcgi.conf;
include /etc/nginx/fastcgi_params;
# fastcgi_pass unix:/var/run/php/php7-0.fpm.sock;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;

location ~ /.
access_log off;
log_not_found off;
deny all;












share|improve this question
















I'm currently setting up OpenMediaVault on my Rock64 Single Board PC which is based off Debian and is configured through the web GUI running from NGINX on port 80.



I'm currently trying to install Nextcloud using NGINX, MariaDB/MySQL and PHPMyAdmin, and originally I was hoping to use Docker to install and manage them all. Unfortunately I've had nothing but problems so I reverted to installing the software from the Linux repository.



I have successfully setup a MySQL server with a user and database ready for Nextcloud and have managed to get PHPMyAdmin working on a different port 8080.



Instead of using ports I would like to use subdomains but I can't seem to get them to work. So far I have set the root directories as the following:-



/var/www/openmediavault
/var/www/phpmyadmin
/var/www/nextcloud


I would like the following subdomains:- N.B I will setup SSL at a later date once I take this over a WAN.




  • http://rock64.lan (default OpenMediaVault web GUI)


  • http://phpmyadmin.rock64.lan (PHPMyAdmin GUI for MySQL)


  • http://nextcloud.rock64.lan (Nextcloud web GUI)

My NGINX is configured to use
/etc/nginx/sites-available
and
/etc/nginx/sites-enabled



The following symbolic links will be used with respective names:-



ln -s /etc/nginx/sites-available/openmediavault-webgui /etc/nginx/sites-enabled/openmediavault-webgui
ln -s /etc/nginx/sites-available/phpmyadmin /etc/nginx/sites-enabled/phpmyadmin
ln -s /etc/nginx/sites-available/nextcloud /etc/nginx/sites-enabled/nextcloud


This is the conetents of the openmediavault-webgui file



server images)/ 
expires 2d;

location /favicon
expires 14d;

location ~ .php$
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm-openmediavault-webgui.sock;
fastcgi_index index.php;
fastcgi_read_timeout 60s;
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

listen 80 default_server;
include /etc/nginx/openmediavault-webgui.d/*.conf;



I also have a symbolic link from PHPMyAdmin's location to www directory



ln -s /usr/share/phpmyadmin /var/www/phpmyadmin



Many thanks



Will



UPDATE 10:18 03/06/2019
Here is the server block for /etc/nginx/sites-enabled/phpmyadmin

server
listen 80;
root /var/www/phpmyadmin;
index index.php;
server_name phpmyadmin.rock64.lan;
location /
try_files $uri $uri/ =404;

location ~ .php
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7-0.fpm.sock;
fastcgi_index index.php;




UPDATE 11:25 03/06/2019
After configuring my OpenWrt router I can do a DNS lookup and http://phpmyadmin.rock64.lan is pointing to the correct IP address. However, I'm getting 502 Bad Gateway. One forum I came across mentioned setting the ownership and permissions. I've had play around with them but no change.



Under /etc/php/7.0/fpm/pool.d/ I have:



[openmediavault-webgui]
user = openmediavault-webgui
group = openmediavault-webgui

listen = /var/run/php-fpm-openmediavault-webgui.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0600

pm = ondemand
pm.max_children = 25
pm.process_idle_timeout = 10s

chdir = /

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; openmediavault php.ini settings ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Paths and Directories
php_value[include_path] = ".:/usr/share/php:/var/www/openmediavault"

; Pam Authentication Support (see /etc/pam.d)
php_value[pam.servicename] = "openmediavault-webgui";

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
php_value[upload_max_filesize] = 25M

; Maximum size of POST data that PHP will accept.
; http://php.net/post-max-size
php_value[post_max_size] = 25M

; Do not expose to the world that PHP is installed on the server.
; http://php.net/expose-php
php_value[expose_php] = Off

; Name of the session (used as cookie name).
; http://php.net/session.name
php_value[session.name] = X-OPENMEDIAVAULT-SESSIONID

; Default timeout for socket based streams (seconds)
; http://php.net/default-socket-timeout
php_value[default_socket_timeout] = 90

; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
php_value[max_execution_time] = 90


UPDATE 09/05/2019
I have now registered the FQDN as phpmyadmin.rock64.test to eliminate any conflicts and this is registered in my OpenWrt router's DNS. I can ping the domain name and I get reply back from the statically assigned IP address (192.168.1.123) I have linked to the LAN hostname. For other testing purposes I have assigned port 8080 but neither the FQDN or accessing via http://192.168.1.123:8080 works and still results in a bad gateway 502.



server 
listen 8080;
root /var/www/phpmyadmin;
index index.php index.html index.htm;
server_name phpmyadmin.rock64.test;
server_tokens off;
location ~ .php$
try_files $uri +404;
# include snippets/fastcgi-php.conf;
include /etc/nginx/fastcgi.conf;
include /etc/nginx/fastcgi_params;
# fastcgi_pass unix:/var/run/php/php7-0.fpm.sock;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;

location ~ /.
access_log off;
log_not_found off;
deny all;









nginx mysql subdomain phpmyadmin nextcloud






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 9 at 9:24







willowen100

















asked May 2 at 21:23









willowen100willowen100

11




11












  • Do not use arbritrary TLD such as .lan as you are exposing yourself to collisions. Use either the names that are defined for that purpose (see RFC2606 but typically .example or .test) or create a true domain name, in any existing TLD and then use internally as a suffix for all names.

    – Patrick Mevzek
    May 3 at 16:38











  • @PatrickMevzek I have changed to the .local TLD which the system OMV (Debian) uses by default. I will need to update my router's DNS table like before. I will post back with an update once I've tested.

    – willowen100
    May 4 at 7:52











  • .local is used by mDNS (multicast DNS) so it is fine if you are absolutely sure no devices on your network use that protocol. Otherwise, you need another one if you want to avoid clashes.

    – Patrick Mevzek
    May 5 at 15:20

















  • Do not use arbritrary TLD such as .lan as you are exposing yourself to collisions. Use either the names that are defined for that purpose (see RFC2606 but typically .example or .test) or create a true domain name, in any existing TLD and then use internally as a suffix for all names.

    – Patrick Mevzek
    May 3 at 16:38











  • @PatrickMevzek I have changed to the .local TLD which the system OMV (Debian) uses by default. I will need to update my router's DNS table like before. I will post back with an update once I've tested.

    – willowen100
    May 4 at 7:52











  • .local is used by mDNS (multicast DNS) so it is fine if you are absolutely sure no devices on your network use that protocol. Otherwise, you need another one if you want to avoid clashes.

    – Patrick Mevzek
    May 5 at 15:20
















Do not use arbritrary TLD such as .lan as you are exposing yourself to collisions. Use either the names that are defined for that purpose (see RFC2606 but typically .example or .test) or create a true domain name, in any existing TLD and then use internally as a suffix for all names.

– Patrick Mevzek
May 3 at 16:38





Do not use arbritrary TLD such as .lan as you are exposing yourself to collisions. Use either the names that are defined for that purpose (see RFC2606 but typically .example or .test) or create a true domain name, in any existing TLD and then use internally as a suffix for all names.

– Patrick Mevzek
May 3 at 16:38













@PatrickMevzek I have changed to the .local TLD which the system OMV (Debian) uses by default. I will need to update my router's DNS table like before. I will post back with an update once I've tested.

– willowen100
May 4 at 7:52





@PatrickMevzek I have changed to the .local TLD which the system OMV (Debian) uses by default. I will need to update my router's DNS table like before. I will post back with an update once I've tested.

– willowen100
May 4 at 7:52













.local is used by mDNS (multicast DNS) so it is fine if you are absolutely sure no devices on your network use that protocol. Otherwise, you need another one if you want to avoid clashes.

– Patrick Mevzek
May 5 at 15:20





.local is used by mDNS (multicast DNS) so it is fine if you are absolutely sure no devices on your network use that protocol. Otherwise, you need another one if you want to avoid clashes.

– Patrick Mevzek
May 5 at 15:20










2 Answers
2






active

oldest

votes


















1














The server_name should contain fully qualified domain name, such as server_name xyz.example.com



The details are in the nginx docs.






share|improve this answer























  • Is there a wildcard I can use for the main domain itself? At the moment I have a DHCP hostname with a suffix so all of my LAN clients are 'hostname.lan' Do I specifically have to set it's full hostname or can I use a wildcard or something else in place to pick whatever the OMV/Debian server's hostname is? I tried putting 'server_name phpmyadmin.*', restarting NGINX and all I got was server not found.

    – willowen100
    May 3 at 6:26


















1














You need to create a server block for each of your domains, and have the domain name listed in server_name directive.






share|improve this answer























  • Is the indentation of the server block dictated by tabs or spaces? Also as long as I set the root directory to each subdomain to the correct directory in '/var/www' does it matter the FQDN isn't also the name of the directory?

    – willowen100
    May 3 at 6:30












  • I think the the only thing that matters with the server block are the characters. The name of the root directory makes no difference.

    – Tero Kilkanen
    May 3 at 6:41











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f965648%2fhaving-trouble-setting-subdomains-on-nginx%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














The server_name should contain fully qualified domain name, such as server_name xyz.example.com



The details are in the nginx docs.






share|improve this answer























  • Is there a wildcard I can use for the main domain itself? At the moment I have a DHCP hostname with a suffix so all of my LAN clients are 'hostname.lan' Do I specifically have to set it's full hostname or can I use a wildcard or something else in place to pick whatever the OMV/Debian server's hostname is? I tried putting 'server_name phpmyadmin.*', restarting NGINX and all I got was server not found.

    – willowen100
    May 3 at 6:26















1














The server_name should contain fully qualified domain name, such as server_name xyz.example.com



The details are in the nginx docs.






share|improve this answer























  • Is there a wildcard I can use for the main domain itself? At the moment I have a DHCP hostname with a suffix so all of my LAN clients are 'hostname.lan' Do I specifically have to set it's full hostname or can I use a wildcard or something else in place to pick whatever the OMV/Debian server's hostname is? I tried putting 'server_name phpmyadmin.*', restarting NGINX and all I got was server not found.

    – willowen100
    May 3 at 6:26













1












1








1







The server_name should contain fully qualified domain name, such as server_name xyz.example.com



The details are in the nginx docs.






share|improve this answer













The server_name should contain fully qualified domain name, such as server_name xyz.example.com



The details are in the nginx docs.







share|improve this answer












share|improve this answer



share|improve this answer










answered May 2 at 21:38









kubanczykkubanczyk

10.7k42946




10.7k42946












  • Is there a wildcard I can use for the main domain itself? At the moment I have a DHCP hostname with a suffix so all of my LAN clients are 'hostname.lan' Do I specifically have to set it's full hostname or can I use a wildcard or something else in place to pick whatever the OMV/Debian server's hostname is? I tried putting 'server_name phpmyadmin.*', restarting NGINX and all I got was server not found.

    – willowen100
    May 3 at 6:26

















  • Is there a wildcard I can use for the main domain itself? At the moment I have a DHCP hostname with a suffix so all of my LAN clients are 'hostname.lan' Do I specifically have to set it's full hostname or can I use a wildcard or something else in place to pick whatever the OMV/Debian server's hostname is? I tried putting 'server_name phpmyadmin.*', restarting NGINX and all I got was server not found.

    – willowen100
    May 3 at 6:26
















Is there a wildcard I can use for the main domain itself? At the moment I have a DHCP hostname with a suffix so all of my LAN clients are 'hostname.lan' Do I specifically have to set it's full hostname or can I use a wildcard or something else in place to pick whatever the OMV/Debian server's hostname is? I tried putting 'server_name phpmyadmin.*', restarting NGINX and all I got was server not found.

– willowen100
May 3 at 6:26





Is there a wildcard I can use for the main domain itself? At the moment I have a DHCP hostname with a suffix so all of my LAN clients are 'hostname.lan' Do I specifically have to set it's full hostname or can I use a wildcard or something else in place to pick whatever the OMV/Debian server's hostname is? I tried putting 'server_name phpmyadmin.*', restarting NGINX and all I got was server not found.

– willowen100
May 3 at 6:26













1














You need to create a server block for each of your domains, and have the domain name listed in server_name directive.






share|improve this answer























  • Is the indentation of the server block dictated by tabs or spaces? Also as long as I set the root directory to each subdomain to the correct directory in '/var/www' does it matter the FQDN isn't also the name of the directory?

    – willowen100
    May 3 at 6:30












  • I think the the only thing that matters with the server block are the characters. The name of the root directory makes no difference.

    – Tero Kilkanen
    May 3 at 6:41















1














You need to create a server block for each of your domains, and have the domain name listed in server_name directive.






share|improve this answer























  • Is the indentation of the server block dictated by tabs or spaces? Also as long as I set the root directory to each subdomain to the correct directory in '/var/www' does it matter the FQDN isn't also the name of the directory?

    – willowen100
    May 3 at 6:30












  • I think the the only thing that matters with the server block are the characters. The name of the root directory makes no difference.

    – Tero Kilkanen
    May 3 at 6:41













1












1








1







You need to create a server block for each of your domains, and have the domain name listed in server_name directive.






share|improve this answer













You need to create a server block for each of your domains, and have the domain name listed in server_name directive.







share|improve this answer












share|improve this answer



share|improve this answer










answered May 2 at 22:39









Tero KilkanenTero Kilkanen

20.7k22744




20.7k22744












  • Is the indentation of the server block dictated by tabs or spaces? Also as long as I set the root directory to each subdomain to the correct directory in '/var/www' does it matter the FQDN isn't also the name of the directory?

    – willowen100
    May 3 at 6:30












  • I think the the only thing that matters with the server block are the characters. The name of the root directory makes no difference.

    – Tero Kilkanen
    May 3 at 6:41

















  • Is the indentation of the server block dictated by tabs or spaces? Also as long as I set the root directory to each subdomain to the correct directory in '/var/www' does it matter the FQDN isn't also the name of the directory?

    – willowen100
    May 3 at 6:30












  • I think the the only thing that matters with the server block are the characters. The name of the root directory makes no difference.

    – Tero Kilkanen
    May 3 at 6:41
















Is the indentation of the server block dictated by tabs or spaces? Also as long as I set the root directory to each subdomain to the correct directory in '/var/www' does it matter the FQDN isn't also the name of the directory?

– willowen100
May 3 at 6:30






Is the indentation of the server block dictated by tabs or spaces? Also as long as I set the root directory to each subdomain to the correct directory in '/var/www' does it matter the FQDN isn't also the name of the directory?

– willowen100
May 3 at 6:30














I think the the only thing that matters with the server block are the characters. The name of the root directory makes no difference.

– Tero Kilkanen
May 3 at 6:41





I think the the only thing that matters with the server block are the characters. The name of the root directory makes no difference.

– Tero Kilkanen
May 3 at 6:41

















draft saved

draft discarded
















































Thanks for contributing an answer to Server Fault!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f965648%2fhaving-trouble-setting-subdomains-on-nginx%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020