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.
- su -
- cd /etc/init.d
- 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
- replace SERVERNAME with the name of your server
- make sure SunWebServer7 has the same ownership and permissions as the other files in the /etc/init.d directory
- 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
http, solaris, unix
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
http, server, web