Archive

Posts Tagged ‘http’

Start Sun One Web Server 7 on boot (Solaris 9)

June 10th, 2009

During the Sun One Web Server install, there is an option to have the web server start on system boot or reboot. In the case that you did not select this option, but would like the web server to start on boot, here’s how you do it.

  1. su -
  2. cd /etc/init.d
  3. create a file named SunWebServer7, and add the following:
    #!/sbin/sh

    #start SunOneWebServer 7 on system restart and boot

    case “$1″ in
    start)
    /var/opt/SUNWwbsvr7/https-SERVERNAME.com/bin/startserv
    ;;
    stop)
    /var/opt/SUNWwbsvr7/https-SERVERNAME.com/bin/stopserv
    ;;
    restart)
    /var/opt/SUNWwbsvr7/https-SERVERNAME.com/bin/restartserv
    ;;
    *)
    echo $”usage: $0 {start|stop|restart}”
    exit 1
    esac

  4. replace SERVERNAME with the name of your server
  5. make sure SunWebServer7 has the same ownership and permissions as the other files in the /etc/init.d directory
  6. create symbolic links to this script in the /etc/rc*.d/ directories. For example:

    ln -s /etc/init.d/SunWebServer7 /etc/rc0.d/K99SunWebServer

linux/unix, web server , ,

Get web server info from Linux command line

March 6th, 2009

Ever want to know what platform a website is running on? If there isn’t the obvious “.apsx” or other file extension, give this a try from command line (using deeblake.com as example):

type this and hit ENTER:

# telnet www.deeblake.com 80

you get this:
Trying 208.113.238.218…
Connected to www.deeblake.com (208.113.238.218).
Escape character is ‘^]’.

then type this and then hit ENTER twice:

GET / HTTP/1.1

you’ll get something like this:


HTTP/1.1 400 Bad Request
Date: Fri, 06 Mar 2009 19:43:49 GMT
Server: Apache/2.0.63 (Unix) PHP/4.4.7 mod_ssl/2.0.63 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.4.2
Content-Length: 226
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”>
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>
Connection closed by foreign host.

Notice the “Server” line that has all of the platform specs.

http, linux/unix, web server , ,