I have a subdomain, let's say it's called service.example.com
. I want to set up this domain to redirect all HTTP(S) (80
and 443
) calls to the apex domain example.com
and the rest of requests to specific TCP port (60000
) to my service. Can I do it with DNS SRV entry?
sobi3ch's questions
I'm writing a script that will spin up server that want to use certain port number. In some occasions this port is occupied. I want to know how to check it in bash so I can react in proper way.
How can I check on linux certain port is occupied?
I know that -t
option in ssh allocate pseudo-tty. I'm using -t
to "jump" to different directory on login, something like this:
ssh -t my-server "cd /path/to/my/directory; bash --login"
.
Why if I log in without it (normally) /etc/motd
is printed and with -t
it is not? I know I can cat /etc/motd
before cd
but wondering is there cleaner solution and WHY is happening like that at all.
ps: As You can imagine I want MOTD to be prited on login even if I use -t
.
After standard installation of phpmyadmin on Ubuntu 14.04 I found <site>/phpmyadmin
doesn't work. After googling it, I found this can be solved with adding this line
Include "/etc/apache2/conf-enabled/*.conf"
Added to /etc/apache2/apache2.conf
config file.
But after apache reload I get this error message
* Reloading web server apache2
*
* The apache2 configtest failed. Not doing anything.
Output of config test was:
AH00526: Syntax error on line 30 of /etc/apache2/conf-enabled/phpmyadmin.conf:
Unknown Authz provider: valid-user
Action 'configtest' failed.
The Apache error log may have more information.
How can I fix error and make phpmyadmin
working?
I'm trying to accomplish something like this
DocumentRoot /www/_offline.com
<VirtualHost *:80>
ServerName example1.com
ServerAlias www.example1.com
</VirtualHost>
<VirtualHost *:80>
ServerName example2.com
ServerAlias www.example2.com
DocumentRoot /www/_offline.com
</VirtualHost>
Is it possible to have ONE documentRoot for different domains?
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
default server localhost (/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost localhost (/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost aa.atd (/etc/apache2/sites-enabled/all-phoenix-domains:2)
port 80 namevhost atd.atd (/etc/apache2/sites-enabled/all-phoenix-domains:13)
port 80 namevhost test (/etc/apache2/sites-enabled/test:1)
Syntax OK