SnapOverflow

SnapOverflow Logo SnapOverflow Logo

SnapOverflow Navigation

  • Home
  • Server
  • Ubuntu

Mobile menu

Close
  • Home
  • System Administrators
    • Hot Questions
    • New Questions
    • Tags
  • Ubuntu
    • Hot Questions
    • New Questions
    • Tags
  • Help
Home / user-16033

Thierry Lam's questions

Martin Hope
Thierry Lam
Asked: 2016-09-14 09:48:36 +0800 CST

How do you test if the AWS load balancer is working?

  • 0

I've created a load balancer from the AWS console. With the generated url, how can I test that it is actually working? Curling or accessing it from a browser is not working. The load balancer url looks like

internal-site-123456.us-east-3.elb.amazonaws.com

Curling or pinging the http/https version of the above doesn't work.

EDIT

Turns out that I forgot to curl it with the port number. I can test it now.

amazon-web-services
  • 2 Answers
  • 226 Views
Martin Hope
Thierry Lam
Asked: 2012-07-17 12:30:36 +0800 CST

wget works for all sites on the web but not the one hosted on that server

  • 0

I currently have 2 Ubuntu 12.04 servers which are load balanced. If I go to anyone on them from the shell and type:

wget stackoverflow.com

The page is fetched into index.html. However, assuming the site hosted on those servers is called mysite.com, calling

wget mysite.com

I get:

Resolving mysite.com (mysite.com)... 50.XXX.YY.ZZZ
Connecting to mysite.com (mysite.com)|50.XXX.YY.ZZZ|:80... failed: Connection refused.

where 50.XXX.YY.ZZZ is the public IP of mysite.com. Any ideas what is wrong on those servers?

wget
  • 2 Answers
  • 3542 Views
Martin Hope
Thierry Lam
Asked: 2011-04-13 13:34:19 +0800 CST

Is it recommended to run Ubuntu Server updates on a live server?

  • 8

When I ssh into an Ubuntu server which is running a live web site, I see the following messages:

2 packages can be updated.
2 updates are security updates.

At that point, I can update and upgrade with the following command:

sudo apt-get update
sudo apt-get upgrade

Is it recommended to run the above on a live server with mission critical applications?

ubuntu-10.04
  • 6 Answers
  • 1901 Views
Martin Hope
Thierry Lam
Asked: 2011-04-06 11:23:14 +0800 CST

How do I switch servers for a web site with minimum disruption?

  • 0

I currently have a site with a public and private IP running properly on an apache server A. There's also a new server B which will host the site ready to go with its own private IP.

Current Server - A:

  • PUBLIC_IP
  • PRIVATE_IP

New Server - B:

  • NEW_PRIVATE_IP

The above IPs are currently accessible form a web browser. In our firewall settings web interface:

# Current settings
PUBLIC_IP => PRIVATE_IP

# Suggested settings
PUBLIC_IP => NEW_PRIVATE_IP

PUBLIC_IP is currently pointing to PRIVATE_IP. I was told that pointing PUBLIC_IP to NEW_PRIVATE_IP should be sufficient to complete the server switch and the downtime will be a few seconds.

Has anyone done a similar task before? What am I missing from the above steps?

EDIT

Here's what I see when I access PUBLIC_IP in Firefox after pointing to the NEW_PRIVATE_IP in the firewall settings:

Firefox can't find the server at PUBLIC_IP

After reverting to PRIVATE_IP in the firewall settings, the PUBLIC_IP is accessible through Firefox.

apache-2.2
  • 3 Answers
  • 63 Views
Martin Hope
Thierry Lam
Asked: 2011-03-26 06:54:36 +0800 CST

How do I change postfix configuration after installing it?

  • 13

During the postfix installation and configuration, I was presented with a few options on how to send and receive email. I might have chosen the wrong option. How do I go back to that configuration screen to change my option?

postfix
  • 3 Answers
  • 46640 Views
Martin Hope
Thierry Lam
Asked: 2010-04-02 06:05:04 +0800 CST

How do I sync the time for my linux guest VM through VMware Fusion?

  • 1

I have Ubuntu server 9.10 running through VMware Fusion 2.0.6 on my Mac OSX 10.5 host. My linux guest VM's time keep being out of sync. I believe I have VMware tools installed because after running the following on linux in the terminal, I get:

$vmware-toolbox-cmd timesync status
Enabled

What should I do to make sure my time is always in sync?

ubuntu mac-osx vmware-fusion
  • 1 Answers
  • 898 Views
Martin Hope
Thierry Lam
Asked: 2010-03-30 07:46:45 +0800 CST

How do I install VMware tools on Ubuntu 9.10 Server 64 bits with no GUI?

  • 3

Host OS: Mac OS X 10.5 with VMware Fusion 2.0.6

I have successfully installed and running Ubuntu 9.10 server edition on a VMware guest. When I select my VM and click Install VMware Tools, nothing happens. Is there a way to install VMware tools through the CLI only?

ubuntu vmware-fusion
  • 2 Answers
  • 905 Views
Martin Hope
Thierry Lam
Asked: 2010-02-07 13:43:49 +0800 CST

How do I test whether a newly created user can communicate with a PostgreSQL database?

  • 0

My settings:

  • Ubuntu 9.10
  • PostgreSQL 8.4.2

I created a new user(jdoe) under my local PostgreSQL with the following command in the psql shell:

CREATE USER jdoe WITH PASSWORD 'password';

I also have created a new database called mydb. My goal is to give user jdoe full access to database mydb. I did a few things through the GUI pgAdmin III and after running \l in the psql shell, I get the following output:

                                    List of databases
Name     |  Owner   | Encoding |  Collation  |    Ctype    |   Access privileges
--------------+----------+----------+-------------+-------------+---------------
mydb     | jdoe     | UTF8     | en_CA.UTF-8 | en_CA.UTF-8 | =CTc/mydb
                                                           : hmart=CTc/mydb
postgres | postgres | UTF8     | en_CA.UTF-8 | en_CA.UTF-8 | 

Showing my list of users(\du), I get:

            List of roles
 Role name | Attributes  | Member of 
-----------+-------------+-----------
 jdoe      |             | {}
 postgres  | Superuser   | {}
           : Create role   
           : Create DB    

I can't really tell from the above if my goal has been achieved, but is there a way to test if the user jdoe can communicate with the database mydb? I'm testing it though Django's settings:

DATABASE_ENGINE = 'postgresql_psycopg2'           
DATABASE_NAME = 'mydb'      
DATABASE_USER = 'jdoe'       
DATABASE_PASSWORD = 'password'        
DATABASE_HOST = ''         
DATABASE_PORT = '' 

but I'm getting the following error after a python manage.py syncdb:

psycopg2.OperationalError: FATAL:  Ident authentication failed for user "jdoe"

I did all the above on Win XP with the latest PostgreSQL installer and everything work flawlessly with Django. I'm not sure what I'm missing under Ubuntu.

django postgresql
  • 2 Answers
  • 1411 Views
Martin Hope
Thierry Lam
Asked: 2010-02-06 20:54:20 +0800 CST

What's the default superuser username/password for postgres after a new install?

  • 464

I have just installed postgres 8.4 on Ubuntu 9.10 and it has never asked me to create a superuser. Is there a default superuser and its password? If not, how do I create a new one?

user-management postgresql
  • 5 Answers
  • 1138706 Views
Martin Hope
Thierry Lam
Asked: 2010-02-03 08:05:27 +0800 CST

How can I run Selenium tests on an Ubuntu server?

  • 10

I currently have a test machine running Ubuntu server 9.10 with no GUI. I want to run my Selenium RC test suites which open Firefox and perform a series of operation. I could bloat my test server with Gnome or KDE to run those tests but I'm looking for a lighter solution. Does anyone have some suggestions on how to run GUI tests on an Ubuntu server?

ubuntu selenium
  • 2 Answers
  • 19374 Views
Martin Hope
Thierry Lam
Asked: 2009-12-03 08:30:19 +0800 CST

Are wildcard SSL certificates supported across all browsers?

  • 3

Does anyone know if a wildcard certificate is supported across all browsers: IE6, IE7, IE8, Firefox, Chrome and Safari? If I were to access the following secured sites sharing one wildcard certificate across all browsers, I won't be prompted by the browser:

https://one.example.com
https://two.example.com
https://three.example.com
ssl-certificate
  • 3 Answers
  • 1042 Views
Martin Hope
Thierry Lam
Asked: 2009-12-01 11:30:03 +0800 CST

I can access my secured site by its IP but not its domain name

  • 0

I have setup a site through Apache, let's call it http://example.com. The regular site works fine and I can also access it by its IP number http://200.x.x.x. I can also access the secured version at https://200.x.x.x. However, https://example.com doesn't work and give me the following message in Firefox:

Unable to connect
Firefox can't establish a connection to the server at example.com

My apache configuration file for the secured site under sites-enabled is:

<VirtualHost 10.x.x.x:443>
    ServerName example.com
    ServerAlias example.com

    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/example.com.pem

    # We additionally removed HIGH security as some older MSIE browsers still can't do
    # strong crypto and they timeout
    SSLProtocol -all +SSLv3 +TLSv1
    #SSLCipherSuite SSLv3:+HIGH:+MEDIUM
    SSLCipherSuite HIGH:!SSLv2:!ADH:!aNULL:!eNULL:!NULL
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0

    WSGIDaemonProcess example.com-ssl user=www-data group=www-data processes=3
    WSGIProcessGroup example.com-ssl 
    WSGIScriptAlias / /home/dev/project/example/apache/django.wsgi
</VirtualHost>

The private IP 10.x.x.x gets mapped to 200.x.x.x. Does anyone know what I might be missing? I've done the above for a few other sites and they work fine, I can't pinpoint what's wrong with the above setup.

apache-2.2
  • 2 Answers
  • 162 Views
Martin Hope
Thierry Lam
Asked: 2009-11-24 08:08:44 +0800 CST

Some clarifications on an SSL certificate

  • 2

I currently have a secured site running at https://current.example.ca and the certificate is bound to current.example.ca. I also have a new version of the site running at https://new.example.com. If I use the current certificate on the new site, I will get the following warning from Google Chrome:

You attempted to reach new.example.com, but instead you actually reached a server identifying itself as current.example.ca.

What are the steps that I should take to get a new certificate for my new site? Should I:

  1. Re-generate a new public/private key pair
  2. Send the new public key along with the new distinguished name new.example.ca to a CA to get a new one

What are your thoughts?

ssl
  • 1 Answers
  • 367 Views
Martin Hope
Thierry Lam
Asked: 2009-11-04 07:25:04 +0800 CST

How many processes should I specify in a WSGIDaemonProcess while running Django through mod_wsgi?

  • 26

Let's say I have 2 sites(Superuser and Serverfault) running from their own Apache virtual host on one box. The 2 sites are powered by Django and are running on Apache with mod-wsgi. A typical configuration file for one of the site will look like the following:

WSGIDaemonProcess serverfault.com user=www-data group=www-data processes=5

The host is a linux machine with 4GB of RAM running Ubuntu. Can anyone suggest the number of processes I should specify above for my 2 sites? Let's assume they have the same traffic as the actual Superuser and Serverfault sites.

apache-2.2
  • 2 Answers
  • 20068 Views
Martin Hope
Thierry Lam
Asked: 2009-10-10 17:57:26 +0800 CST

Can I run two different secure sites using the port 443 on the same server?

  • 6

Let's say I want two secure sites running from the same machine using the Apache server:

 1. https://example.com
 2. https://example.ca

Is it possible to use port 443 for both of the above sites?

apache-2.2
  • 6 Answers
  • 19692 Views
Martin Hope
Thierry Lam
Asked: 2009-08-22 12:50:59 +0800 CST

How do I show filenames only after a keyword grep search?

  • 18

I currently have n data files in a directory where each file has at most 1 line of very long data. My directory structure is

director/
    data1.json
    data2.json
    data3.json

I know that at least one of those files contain the keyword I'm looking for, but since the one line of data is too long, it covers my entire terminal. How do I get the filename only after performing a keyword grep? The grep command I'm using is:

grep keyword *.json
grep
  • 2 Answers
  • 12617 Views

Sidebar

Stats

  • Questions 681965
  • Answers 980273
  • Best Answers 280204
  • Users 287326
  • Popular
  • Answers
  • Marko Smith

    Can you pass user/pass for HTTP Basic Authentication in URL parameters?

    • 5 Answers
  • Marko Smith

    Ping a Specific Port

    • 18 Answers
  • Marko Smith

    Check if port is open or closed on a Linux server?

    • 7 Answers
  • Marko Smith

    How to automate SSH login with password?

    • 10 Answers
  • Marko Smith

    How do I tell Git for Windows where to find my private RSA key?

    • 30 Answers
  • Marko Smith

    What's the default superuser username/password for postgres after a new install?

    • 5 Answers
  • Marko Smith

    What port does SFTP use?

    • 6 Answers
  • Marko Smith

    Command line to list users in a Windows Active Directory group?

    • 9 Answers
  • Marko Smith

    What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats?

    • 3 Answers
  • Marko Smith

    How to determine if a bash variable is empty?

    • 15 Answers
  • Martin Hope
    Davie Ping a Specific Port 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    Smudge Our security auditor is an idiot. How do I give him the information he wants? 2011-07-23 14:44:34 +0800 CST
  • Martin Hope
    kernel Can scp copy directories recursively? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh returns "Bad owner or permissions on ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil How to automate SSH login with password? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin How do I deal with a compromised server? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner How can I sort du -h output by size 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent How to determine if a bash variable is empty? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus How do you find what process is holding a file open in Windows? 2009-05-01 16:47:16 +0800 CST

Related Questions

Trending Tags

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Home
  • Questions
    • Hot Questions
    • New Questions
  • Tags
  • Help

Footer

SnapOverflow

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Help

© 2022 SOF-TR. All Rights Reserve