Skip to content

Instantly share code, notes, and snippets.

@duxor
Last active January 13, 2020 18:10
Show Gist options
  • Select an option

  • Save duxor/a2319a8fa33772acf0fa7ae914f3cba1 to your computer and use it in GitHub Desktop.

Select an option

Save duxor/a2319a8fa33772acf0fa7ae914f3cba1 to your computer and use it in GitHub Desktop.
How to make custom domain from docker available on mobile device in the same network
# /etc/hosts
127.0.0.1 startupkin.test
# /etc/nginx/sites-available/startupkin.test.conf
server {
listen 80;
listen [::]:80;
server_name startupkin.test;
root /var/www/startupkin/public;
index index.php;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass php-upstream;
fastcgi_index index.php;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 600;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
error_log /var/log/nginx/startupkin.test_error.log;
access_log /var/log/nginx/startupkin.test_access.log;
}
# Android app for manage hosts at mobile
https://play.google.com/store/apps/details?id=dns.hosts.server.change&hl=en_US
# Settings at the app
# Add doamin with:
IP = 192.168.1.4 (IP address of computer)
Domain: startupkin.test (your custom doamin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment