Skip to main content

Posts

apache 2.2 - How to redirect from /page to /cms/page and hide "cms“ in the URL?

I installed cms at Linux server 10.0.0.1/cms/. I want to redirect every visit to 10.0.0.1/pages to 10.0.0.1/cms/pages, while hide "cms" in the URLs. Several attempts have been tried but failed. 1> edit /etc/httpd/conf/httpd.conf DocumentRoot "/var/www/html" --> DocumentRoot "/var/www/html/cms" This only works for index page. Hyperlinks in the index "10.0.0.1/cms/pages" will become unavailable in this case, as /cms/pages no longer exist in the DocumentRoot directory "/var/www/html/cms". 2> edit /etc/httpd/conf/httpd.conf Redirect / /cms/ This will cause infinite loop 10.0.0.1/cms/cms/cms/... Any idea on this? Answer You could do this with mod_rewrite RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /cms/$1 [L] You can place this in your /etc/httpd/conf/httpd.conf inside the vhost you defined (if you have one) or in your otherwise. This will redirect all...

apache 2.2 - Apache2 shared server: default webpage

Greetings, I have an apache2 server with 4 domain names point to my server's single IP address. When I type in www.site1.com it serves pages from /home/eamorr/site1/index.php Same for www.site2.com, www.site3.com and www.site4.com However, when I type in to the address bar of a browser without the www , it always redirects to site1.com! i.e. site1.com -> site1.com site2.com -> site1.com site3.com -> site1.com site4.com -> site1.com How do I configure apache to do the following: site1.com -> site1.com site2.com -> site2.com site3.com -> site3.com site4.com -> site4.com Here is my default config: ServerAdmin admin@site1.com ServerName www.site1.com DocumentRoot /home/eamorr/sites/site1.com/www DirectoryIndex index.php index.html Options Indexes FollowSymLinks MultiViews Options -Indexes AllowOverride all Order allow,deny allow from all php_value session....

Exchange 2007 unable to deliver - but doesn't specify which addresses failed

I have a user that sent an email to 6 people. 3 of them were external addresses, and 3 were internal. The 3 internal users all got theirs, but the sender still got a return. Typically, at the bottom of the return you get this message: Your message did not reach some or all of the intended recipients. Subject: Sent: 7/27/2010 10:39 AM The following recipient(s) cannot be reached: However, there isn't a list of recipients and failure reasons, the email simply ends. How can I go about finding out which addresses failed? I've checked event logs on the Exchange server, with nothing of relevance in there. This is Exchange 2007 Enterprise on Server 2003 EDIT1: I've already been through the Message Tracking utility. The parameters selected were Sender, EventID = Fail, and todays date. It shows no messages failed. Answer The "Message Tracking" functionality in Exchange is going to be of the most assistance to you here. Searching the message tracking ...

Migrating from Postfix/Dovecot to Exchange

The place I work at is currently using Postfix/Dovecot on CentOS 6 for our mail. We will be migrating to Exchange 2013 on Windows Server 2012 in the future. I have been put in charge of this task and I (obviously) would like the migration to go as smooth as possible. The problem is, there doesn't seem to be much documentation for such a migration. At least, not with Exchange 2013. That being said, I have a couple questions. I would like to keep our current mail server as a relay host, as it has a spam filter on it that we like. To my understanding, if I want to accomplish this, all I need to do is add this line to my main.cf: relayhost = ExchangeServer.domain.com Then add the mail server as a trusted server in exchange. Is that correct? My other question is; is there any way to keep all my users email? From my research, it was possible in Exchange 2003 and 2007. But it does not appear to be directly possible with Exchange 2013 without purchasing an enterprise solution, which I...

Heartbleed: What if OpenSSL has been patched but SSL certs not yet rekeyed?

Does anyone know what entry point a hacker could have if a sever's OpenSSL has been patched but a site's SSL certs have not yet been rekeyed? Thanks! Answer If the remote attacker was able to retrieve you private key before you patched, then they can decrypt all any previous communication that has been performed if you didn't use perfect forward secrecy and perform man-in-the middle attacks. Intercepting and possibly modifying existing communications. They could have also captured credentials needed to remotely access and modify your system, or your user's accounts. If you are lucky and nobody used this bug to collect your keys or anything else while you were vulnerable, you would theoretically be fine.

networking - configuring dedicated internet access

I have taken a dedicated internet access service from my ISP. for which i received one P2P IP address with a specified gateway, and 6 IP addresses on a /29 subnet. but they havent specified any gateway for these 6 addresses. Further, they say that is an internal range for my account. What does this mean? that these 6 addresses are not public IPs? if so, how do I configure them ? any help would be appreciated. Answer You mean that you have a P2P (/30) address between your router and the ISP equipment? Internal range usually just means that they will be routing the /29 subnet towards your routers P2P IP address. You'd need to assign the /29 to an interface pointing towards your LAN on the router using one of the ip addresses in the range. Then you can assign the remaining addresses to hosts with a default gateway of whatever address you just assigned on your router interface towards the LAN.

How to handle 1M websocket connections (Nginx/HAProxy/Amazon/Google)

What nginx or haproxy setup is suggested for target 100K concurrent websocket connections? What I think, a single nginx will not be able to take such traffic as well as concurrent connections. How should traffic to nginx/haproxy be split (DNS lvl or any Amazon/Google option available)? How much concurrent websockets a single nginx be able to handle? Tried gathering relevant information from google search and SO posts. Answer There are people running chat servers behind haproxy load balancers at even higher loads. The highest load that was reported to me in private e-mail (with the copy of the stats page) was at around 300k connections per process (hence 600k sockets). Note that under Linux by default a process is limited to 1M file descriptors (hence 500k end-to-end connections), but that can be tweaked in /proc. The most important thing to consider at such loads is the amount of RAM you need. The kernel-side socket buffers will always require at least 4kB per ...

amazon web services - Possible invalid domain records

Hi I am using an elastic loadbalancer from amazon. The problem I am having is that I first had an A record for my domain which pointed to the IP of the loadbalancer. This however only works for a short while because the ip of the loadbalancer is not static. So to resolve this I removed the A record and added a CNAME record with name www.example.com and pointing to the DNS address of the loadbalancer. The weird behavior I am getting however is that when I go to example.com sometimes it cant find a dns record. If I go to https://www.example.com or http://www.example.com it will resolve and when I then try example.com afterwards it also works for a while. Does anyone of you know what might be causing this weird behavior and how to fix it ? Regards, Answer When using an Amazon Load Balancer you also need to use ALIAS DNS records. You did not mention that you are using Route 53 but you will need to. You will need to use ALIAS records for the domain root (mydomain.com) and ea...

domain name system - DNS Question: Run own server, use registrar's, or 3rd party company?

I was wondering... whats the best place to host DNS at? For quick propagation, security, and etc? I always hosted DNS on my own server.... which gave me a lot of control.... but hosting DNS on the same box as http is never a good practice. What are the advantages of using the domain registrar's dns and simply poining the A record to your ip? What about those commerical DNS hosting companies, that charge ~$35/year for it. Are they worth it? Answer I can tell you reasons for and against, from my point of view. First, I run my own servers. Why I do this is both for professional reasons (I write DNS software for a living) and historically geeky ones. I used to love running my own stuff, doing what I wanted with it, and spending hours a day tweaking this or coding up that. The reasons you might want to run your own as well are many, and you touched upon a few big ones: If you run your own, you have full control, full knowledge that what you put in is what you get out, a...

storage - Would using SAS disks instead of SATA disks make sense over NFS for a VMWare datastore?

We are deciding whether to use SATA or SAS aggregates on our Filer for our VMWare datastore. We will be using NFS to connect the VMWare hosts to storage. Doesn't seem to make sense to use SAS disks that have 6GB/s pipeline (15000 RPM) if it's going via NFS over gigabit network (1/8 GB/s). We are teaming the NIC cards but that's still 1/4 GB/s (in ideal conditions). The SATA disks are 7200 RPM and, according to specs, 3GB/s. Perhaps someone with more real-world experience could check my logic. Additional information Both SAS and SATA aggregates have the same amount of disks. Answer The benefit of SAS is the number of IO/s they can do compared to SATA (or midline). SATA drives rotate more slowly (7200 RPM) and thus have a higher read latency. This is made worse by the fact that you'll have more VMs running per drive because of the high density of space. SAS drives that run at 10k or 15k RPM will have a much higher number of IO/s they can do per spindle. You...