How do I exclude directories when listing files in the current directory?
ls .
^ will include directories in the listing.
This seems like a simple question, but after some Google searching I can't seem to find the answer.
I have a staging server where I would like to mimic the production server as much as possible. Let's say I own example.com
and I decide that I want to host a blog using blog.example.com
. I would like to be able to stage the blog before I push it to production using the staging address blog.stage.example.com
. I rather do this than buy another domain such as stage-example.com
or use naming conventions like blog-stage.example.com
.
Obviously, I would want blog.stage.example.com
to point to the server running on the staging environment (e.g. IP 1.1.1.1), and blog.example.com
to point to the server running on the production environment (e.g. IP 2.2.2.2).
I am using Nginx for my web back-end and have Gandi as a hosting provider where I manage my DNS zone file.
Is it possible to configure my domain names with the multi-level subdomains? Or, am I stuck with naming conventions like, blog-stage.example.com
? Or, perhaps there is a better way to manage this that I don't know about?
If it is possible, what would the DNS zone file look like?
And finally, if it is possible, what would the Nginx configuration file look like?
Yesterday, I mistakenly wrote a post-commit hook that fatally broke my server. In fact, when I committed via TortoiseSVN, I could see the post-commit hook remove significant system resources. When I tried to reboot the server, the server did not boot.
Anyway, I'm about to setup SVN again, and I don't want to make the same mistake. How do I restrict my post-commit hook permissions to only be able to modify certain folders?
I have a stage.domainX.com
and domainX.com
. How do I adjust the MX records accordingly to where all mail sent to stage.domainX.com
goes to one server (IP1 66.xx.xx.xx) and all other mail sent to domainX.com
goes to another server (IP2 67.xx.xx.xx)?
[email protected] -> IP1
[email protected] -> IP2
I have a staging server and production server that hosts multiple sites (using Apache2.2). Currently, I have the DNS pointing stage.domainX.com
to the staging server and *.domainX.com
pointing to the production server.
Everything seems to be working pretty good, but I would like to be able to secure the access to the staging server. So, unless it is the right person, someone trying to enter stage.domainX.com
should be disallowed (and, if possible, go to the production server).
And, I wanted to use a domain name instead of an IP because I want the clients to be able to more friendly view the staging site (instead of memorizing an IP address).
Is there a good way to handle this? Or, am I handling the staging domain name process in an unusual way?
P.S. I've actually wanted to manage this through ports, but I haven't figured out a way to do it. Like, domainX.com:80 (standard) goes to production and domainX.com:9000 goes to staging. Haven't found a way to do this in DNS though (using GoDaddy's nameservers/zones).