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

Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company