Skip to main content

Posts

Showing posts from July, 2018

nginx (http + https) on the front with varnish behind

I have have a nginx server serving http and https and I have varnish behind to cache the apache requests nginx (80+443) -> varnish (6081) -> apache (8081) when I serve pages using 443, pages are already cached with port 80 (image references etc) therefore browser alerts saying there is some encrypted and unencrypted content on the page. I cant use relative URLS. is there a config i can keep in vcl so that it uses different hash for https requests.

nginx (http + https) on the front with varnish behind

I have have a nginx server serving http and https and I have varnish behind to cache the apache requests nginx (80+443) -> varnish (6081) -> apache (8081) when I serve pages using 443, pages are already cached with port 80 (image references etc) therefore browser alerts saying there is some encrypted and unencrypted content on the page. I cant use relative URLS. is there a config i can keep in vcl so that it uses different hash for https requests.

SPF records for SMTP service

Please help me to create SPF record that will be helpful to validate my outgoing mail. Here is my server environment. We hosted an application at one hosting provider. Though he provided mail services, we are not using it. Instead we are using GoogleApps for official mail purpose. For this we already configured SPF record as "v=spf1 include:_spf.google.com ~all". Along with this we have newly configured another SMTP server to use it for sending newsletters, promotional mails to our website visitors, as there are some limitations in usage of number of emails per day with GoogleApps. We want to have both email services: GoogleApps and new SMTP server. In such cases, how can we create SPF record mentioning both IP addresses? Here is my new SMTP server IP: 45.23.77.65 Thanks in advance, Max

SPF records for SMTP service

Please help me to create SPF record that will be helpful to validate my outgoing mail. Here is my server environment. We hosted an application at one hosting provider. Though he provided mail services, we are not using it. Instead we are using GoogleApps for official mail purpose. For this we already configured SPF record as "v=spf1 include:_spf.google.com ~all". Along with this we have newly configured another SMTP server to use it for sending newsletters, promotional mails to our website visitors, as there are some limitations in usage of number of emails per day with GoogleApps. We want to have both email services: GoogleApps and new SMTP server. In such cases, how can we create SPF record mentioning both IP addresses? Here is my new SMTP server IP: 45.23.77.65 Thanks in advance, Max

apache 2.2 - Apache2 Ubuntu File Permissions

itemprop="text"> With a fresh Ubuntu LAMP stack, I'm wondering why Apache serves up a Forbidden: Permission Denied error for my site. Apache2 was setup with the default user/group www-data . It's document root is /var/www The permissions of that folder and its contents are 744 webmaster:www-data The webmaster is just a sudo user for maintenance and has been added to the www-data group. But by all things, shouldn't this work? Answer A directory needs to have the execute permission set as well as the read permission. So chmod 755 /var/www should solve your problem.

apache 2.2 - Apache2 Ubuntu File Permissions

With a fresh Ubuntu LAMP stack, I'm wondering why Apache serves up a Forbidden: Permission Denied error for my site. Apache2 was setup with the default user/group www-data . It's document root is /var/www The permissions of that folder and its contents are 744 webmaster:www-data The webmaster is just a sudo user for maintenance and has been added to the www-data group. But by all things, shouldn't this work? Answer A directory needs to have the execute permission set as well as the read permission. So chmod 755 /var/www should solve your problem.

Linux OOM-killer acting despite plenty available memory

Once a week or so the OOM-killer shoots down a postgres process in my server, despite that 'free' states it has plenty of available memory. I have read several threads here and there, but cant see any real explanations. Is it really because the server has now swap? Is it a (Ubuntu) kernel bug? And preemptively, yes perhaps i will add swap. But is there no other solution? Or at least explanation? :) Server: Physical Dell Memory: 64gb RAM and 0 Swap uname: Linux server-name 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Postgres version: 9.5.10 (8gb shared memory) vm.overcommit_memory = 0 Output of free -m just before the last kill total used free shared buff/cache available Mem: 64312 2666 450 8699 61196 52126 Swap: 0 0 0 Kernel lo

Linux OOM-killer acting despite plenty available memory

Once a week or so the OOM-killer shoots down a postgres process in my server, despite that 'free' states it has plenty of available memory. I have read several threads here and there, but cant see any real explanations. Is it really because the server has now swap? Is it a (Ubuntu) kernel bug? And preemptively, yes perhaps i will add swap. But is there no other solution? Or at least explanation? :) Server: Physical Dell Memory: 64gb RAM and 0 Swap uname: Linux server-name 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Postgres version: 9.5.10 (8gb shared memory) vm.overcommit_memory = 0 Output of free -m just before the last kill total used free shared buff/cache available Mem: 64312 2666 450 8699 61196 52126 Swap: 0 0 0 Kernel log from the last kill Jun 19 21:29:49 server-name kernel: [17009377.877956] bash invoked oom-kille

hardware - RAID Array performance on an HP Proliant ML350 G5 Smart Array E200i

itemprop="text"> We have a client who is complaining about performance of an application which utilizes an MS SQL database. They do not believe the performance issues are the fault of the application itself. The Smart Array E200i RAID controller has 128MB cache and we have the cache set to 75% read/25% write. The disk array set to enable write caching. Recently we ran a disk performance test using href="http://www.microsoft.com/downloads/details.aspx?familyid=9a8b005b-84e4-4f24-8d65-cb53442d9e19&displaylang=en" rel="nofollow noreferrer">SQLIO based on href="http://sqlserverpedia.com/wiki/SAN_Performance_Tuning_with_SQLIO" rel="nofollow noreferrer">this guide . We used a 10 GB file for the test found that the average sequential read rate was ~60 MB/sec (megabytes/sec) and the averag

hardware - RAID Array performance on an HP Proliant ML350 G5 Smart Array E200i

We have a client who is complaining about performance of an application which utilizes an MS SQL database. They do not believe the performance issues are the fault of the application itself. The Smart Array E200i RAID controller has 128MB cache and we have the cache set to 75% read/25% write. The disk array set to enable write caching. Recently we ran a disk performance test using SQLIO based on this guide . We used a 10 GB file for the test found that the average sequential read rate was ~60 MB/sec (megabytes/sec) and the average random read rate was ~30 MB/sec. Are these numbers on par for what the server should be performing? Better than on par? Horrible? Amazing? Additional information on the server set up/RAID controller config: There are three, 146 GB SAS 10k RPM 3.0 GB/sec (model HP DG146BABCF) drives, configured in a RAID 5 array. These are the only physical disks available to the server so both logs and data, including operating system data and paging file are all on the same

linux - Correct way to set up DNS primary/secondary/... for redundancy and latency reduction?

I thought DNS primary/secondary for redundancy purposes was straightforward. My understanding is that you should have a primary and at least one secondary, and that you should set up your secondary in a geographically different location, but also behind a different router (see for example href="https://serverfault.com/questions/48087/why-are-there-several-nameservers-for-my-domain" title="this question">https://serverfault.com/questions/48087/why-are-there-several-nameservers-for-my-domain ) Currently, we have two name servers both in our main data center. Recently, we've suffered some outages for various reasons that took out both name servers, and left us and our customers without working DNS for a few hours. I've asked my sysadmin team to finish setting up a DNS server in another data center and configure it as the secondary name

linux - Correct way to set up DNS primary/secondary/... for redundancy and latency reduction?

I thought DNS primary/secondary for redundancy purposes was straightforward. My understanding is that you should have a primary and at least one secondary, and that you should set up your secondary in a geographically different location, but also behind a different router (see for example https://serverfault.com/questions/48087/why-are-there-several-nameservers-for-my-domain ) Currently, we have two name servers both in our main data center. Recently, we've suffered some outages for various reasons that took out both name servers, and left us and our customers without working DNS for a few hours. I've asked my sysadmin team to finish setting up a DNS server in another data center and configure it as the secondary name server. However, our sysadmins claim that this doesn't help much if the other data center is not at least as dependable as the primary data center. They claim that most clients will still fail to look up properly, or time out too long, when the primary data

domain name system - NetworkManager is not changing /etc/resolv.conf after openvpn dns push

itemprop="text"> I've got a problem which is "NetworkManager is not updating /etc/resolv.conf after openvpn connection with dns push configured". Here's my openvpn server config: ( I've changed domain name to ABC.COM for security reason ;) ) ######################################## # Sample OpenVPN config file for # 2.0-style multi-client udp server # # Adapted from http://openvpn.sourceforge.net/20notes.html # # tun-style tunnel port 1194 dev tun # Use "local" to set the source address on multi-homed hosts #local [IP address] # TLS parms tls-server ca keys/ca.crt cert keys/static.crt key keys/static.key dh keys/dh1024.pem proto tcp-server # Tell OpenVPN to be a multi-client udp server mode server # The server's virtual endpoints ifconf

domain name system - NetworkManager is not changing /etc/resolv.conf after openvpn dns push

I've got a problem which is "NetworkManager is not updating /etc/resolv.conf after openvpn connection with dns push configured". Here's my openvpn server config: ( I've changed domain name to ABC.COM for security reason ;) ) ######################################## # Sample OpenVPN config file for # 2.0-style multi-client udp server # # Adapted from http://openvpn.sourceforge.net/20notes.html # # tun-style tunnel port 1194 dev tun # Use "local" to set the source address on multi-homed hosts #local [IP address] # TLS parms tls-server ca keys/ca.crt cert keys/static.crt key keys/static.key dh keys/dh1024.pem proto tcp-server # Tell OpenVPN to be a multi-client udp server mode server # The server's virtual endpoints ifconfig 10.8.0.1 10.8.0.2 # Pool of /30 subnets to be allocated to clients. # When a client connects, an --ifconfig command # will be automatically generated and pushed back to # the client. ifconfig-pool 10.8.0.4 10.8.0.255 # Push route t

domain name system - Windows Server 2008 - Strange DNS resolution between clients and server

We have a new Windows 2008 R2 installation running as a domain controller with DNS. We also have external public IP's which NAT to internal resources on our network. An external DNS has been configured with these external public IP's to resolve the internal resources on our company domain name. These same DNS records have also been configured on the internal Windows 2008 DNS to map to the internal private IP's (where the A record is for a resource not part of the AD, i.e. like a custom company website URL etc). Our problem is that even though internal clients or other member servers have the primary DNS setup as the Windows 2008 DNS server (and the router set as the secondary DNS) the DNS query would intermittently resolve to the external public IP (which won't work as the Cisco router blocks it). Even when you do a nslookup on the resource