Archive for August, 2007

662 Part V . Running Servers 8. You re (Free web space)

Tuesday, August 21st, 2007

662 Part V . Running Servers 8. You re now done installing CPG. At this point you can click Let s Continue to see the default Coppermine Photo Gallery page. You can use this CPG Web interface to create photo galleries and upload photos. Figure 24-3 shows a sample gallery. Figure 24-3: A sample Coppermine photo gallery. While a complete description of the dozens of features of the Coppermine Photo Gallery is beyond the scope of this example, here are a few tips if you want to continue setting up a working photo gallery. To begin, go to the home page of the photo gallery you just created (http://server/~user/photos) and log in with the administrative user and password you created. Then do the following: . Add an Album Click the Albums button and then click New. Type a name for the album and select Apply modifications. Then select Continue as instructed. . Upload files Click the Upload file link at the top of the page. From the Upload file page, add either the full paths to file names (File Uploads) or Web addresses (URI/URL Uploads) of the images you want to install. Then click Continue. If the uploads were successful, click Continue again. At this point, you can add information to be associated with each image you just uploaded. Select the Album each will go into, a file title, and a description, and then select Continue. After you have added information for all you uploaded images, click Continue again to return to the main photo gallery. There you can see your images sorted by album, as random file, or by latest additions.
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

Chapter 24 . Running a Linux, Apache, MySQL, (Web site designers)

Monday, August 20th, 2007

Chapter 24 . Running a Linux, Apache, MySQL, and PHP (LAMP) Server 661 MySQL Host The server name that CGP will connect to for the database. In this case, you want to use localhost. MySQL Database Name The name of the database that you created in Step 2. (In the example, I used cpg.) MySQL Username and Password The username and password that you created in Step 2 for accessing the database. (In the example, I used cpg and mypassword, respectively.) MySQL table prefix The prefix for the tables that will be used by CPG. The default value (cpg133_) is fine. ImageMagick path The directory containing the imagemagick binary. On Debian systems, this is /usr/bin. Figure 24-2: The Coppermine Photo Gallery installation page.
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.

Disney web site - 660 Part V . Running Servers 3. Log

Sunday, August 19th, 2007

660 Part V . Running Servers 3. Log in as the user that will own the CPG installation and download the latest version from the Internet: $ mkdir -p ~/public_html $ cd ~/public_html $ wget http://dl.sourceforge.net/sourceforge/coppermine/cpg1.3.3.zip –19:30:46– http://dl.sourceforge.net/coppermine/cpg1.3.3.zip => `cpg1.3.3.zip Resolving dl.sourceforge.net… 64.74.207.41, 66.35.250.221,… Connecting to dl.sourceforge.net[64.74.207.41]:80… connected. HTTP request sent, awaiting response…200 OK Length: 2,924,274 [application/zip] 100%[===============>] 2,924,274 58.02K/s ETA 00:00 19:31:36 (57.08 KB/s) - `cpg1.3.3.zip saved [2924274/2924274] 4. Unpack the archive: $ unzip cpg1.3.3.zip Archive: cpg1.3.3.zip inflating: cpg133/addfav.php inflating: cpg133/xp_publish.php […] inflating: cpg133/zipdownload.php 5. Rename the freshly unpacked cpg directory, and then set the permissions so that files can be uploaded from PHP: $ mv cpg133 photos $ cd photos $ chmod 777 include $ find albums -type d | xargs chmod 777 6. Go to a Web browser on any machine that can reach your LAMP server over the network and open the install.php script under your coppermine directory. If you re installing CPG under a user directory under your main host, the URL is http://servername/~username/photos/install.php. If you re installing CPG under a virtual host, the URL is http:// virtualhostname/photos/install.php. Figure 24-2 shows the installation page. 7. Configure CPG to work with your installation by filling in the following fields and selecting Let s Go!: Username and Password The administrative login and password that you will use to administer CPG.
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Chapter 24 . (Dedicated web hosting) Running a Linux, Apache, MySQL,

Saturday, August 18th, 2007

Chapter 24 . Running a Linux, Apache, MySQL, and PHP (LAMP) Server 659 Installing a Web Application: Coppermine Photo Gallery Once your LAMP server is operational, you can begin installing or creating applications to run on it. One such application is Coppermine Photo Gallery (CPG), the installation of which is demonstrated in this section. CPG is a Web-based photo gallery management system written in PHP. Through its Web interface, you can upload pictures to your own photo galleries, which will be available on the Web through your LAMP server. You can install CPG under a virtual host or under a user s home directory on your main host. A single server can easily support many CPG installations using either of these methods. To install CPG on the Debian system described in this chapter, follow these steps: 1. Install the unzip and imagemagick programs. Unzip is used to unpack the CPG program after downloading, and imagemagick is used to resize images and create thumbnails: # apt-get install unzip imagemagick 2. Create a MySQL database for CPG. You can use a database name other than cpg if you wish. The database username (the part before the @ localhost in the GRANT statement) and the database name do not need to match. Be sure to replace mypassword with something different: # mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 8 to server version: 4.0.24_Debian-10-log Type help; or h for help. Type c to clear the buffer. mysql> CREATE DATABASE cpg; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON cpg.* TO cpg @ localhost IDENTIFIED BY mypassword ; Query OK, 0 rows affected (0.00 sec) mysql> q Bye
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

658 Part V . Running Servers The DocumentRoot (Web hosting isp)

Saturday, August 18th, 2007

658 Part V . Running Servers The DocumentRoot specifies where the Web documents for this site are stored. If you plan to have more than one site per user, you will need to modify this layout appropriately. Replace username with the name of the account that is administrating the Web site. For this example, each Web site is required to be administered by a different user account. The User and Group lines are used by suexec to determine which account to run scripts as. The groupname parameter should be changed to username s primary group. In most modern installations, this is the same as the username. These two lines must be left out if you aren t using suexec. When you are done, use apachectl to check the configuration and then do a graceful restart: # apachectl configtest Syntax OK # apachectl graceful Unless you have already created it, you will receive a warning about public_html not existing. Run mkdir ~/public_html as the user that owns the Web site in order to create it. Additional virtual hosts can be added by repeating the VirtualHost block and repeating the configuration test (configtest) and reload (graceful) steps. You may want to place individual virtual hosts in separate files for convenience. However, you should be careful to keep your primary virtual host in a file that will be read before the others because the first virtual host receives requests for site names that don t match any in your configuration. In a commercial Web-hosting environment, it is common to make a special default virtual host that contains an error message indicating that no site by that name has been configured. User Content and the UserDir Setting In situations in which you do not have the ability to set up a virtual host for every user that you want to provide Web space for, you can easily make use of the mod_userdir module in Apache. With this module enabled (which it is by default), the public_html directory under every user s home directory is available to the Web at http://servername/~username/. For example, a user named wtucker on www.example.com stores Web content in /home/wtucker/public_html. That content would be available from http://www.example.com/~wtucker. Note Note
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Web server on xp - Chapter 24 . Running a Linux, Apache, MySQL,

Friday, August 17th, 2007

Chapter 24 . Running a Linux, Apache, MySQL, and PHP (LAMP) Server 657 Location blocks (in the generic sense) can be enclosed within a VirtualHost block. Virtual hosts, which are described in greater detail in the next section, are a convenient (and almost essential) tool for altering server behavior based on the server address or name that a request is directed to. Most global configuration options are applied to virtual hosts but can be overridden by directives within the VirtualHost block. Adding a Virtual Host to Apache Apache supports the creation of separate Web sites within a single server to keep content separate. Individual sites are configured in the form of virtual hosts, which also are useful when only a single site will be used. Here s how to configure a virtual host: Create a file named /etc/apache/conf.d/vhosts.conf using this template: NameVirtualHost *:80 ServerName www.example.org ServerAlias web.example.org DocumentRoot /home/username/public_html/ User username Group groupname DirectoryIndex index.php index.html index.htm The NameVirtualHost line tells Apache to determine which virtual host to serve documents from based on the hostname provided by the HTTP client. The *:80 means that requests to port 80 on any IP address will be treated in this manner. Similarly, the *:80 specification in the VirtualHost block indicates what address and port this virtual host applies to. The port is optional for both the NameVirtualHost and VirtualHost specifications but should always be used to prevent interference with SSL virtual hosts. The ServerName and ServerAlias lines tell Apache which names this virtual host should be recognized as, so replace them with names appropriate to your site. You can leave out the ServerAlias line if you do not have any alternate names for the server, and you can specify more than one name per ServerAlias line or have multiple ServerAlias lines if you have several alternate names.
You want to have a cheap webhost for your apache application, then check apache web hosting services.

656 Part V . Running Servers Access control (Free web servers)

Thursday, August 16th, 2007

656 Part V . Running Servers Access control files are useful for allowing users to change specific settings without having access to the server configuration files. The configuration directives permitted within an access configuration file are determined by the AllowOverride setting on the directory in which they are contained. Some directives do not make sense at that level and generally result in a server internal error message when trying to access the URI. The AllowOverride option is covered in detail at http://httpd.apache.org/docs/mod/core.html#allowoverride. Three directives commonly found in location blocks and access control files are DirectoryIndex, Options, and ErrorDocument: . DirectoryIndex tells Apache which file to load when the URI contains a directory but not a filename. This directive doesn t work in Files blocks. . Options is used to adjust how Apache handles files within a directory. The ExecCGI option tells Apache that files in that directory can be run as CGI scripts, and the Includes option tells Apache that server-side includes (SSI) are permitted. Also commonly used is the Indexes option, which tells Apache to generate a list of files if one of the filenames found in the DirectoryIndex setting is missing. An absolute list of options can be specified, or the list of options can be modified by adding + or - in front of an option name. See http://httpd.apache.org/docs/mod/core.html#options for more information. . ErrorDocument directives can be used to specify which file to send in the result of an error. The directive must specify an error code and the full URI for the error document. Possible error codes include 403 (access denied), 404 (file not found), and 500 (server internal error). More information about the ErrorDocument directive can be found at http://httpd.apache.org/ docs/mod/core.html#errordocument. Another common use for location blocks and access control files is to limit access to a resource. The Allow directive can be used to permit access to matching hosts, and the Deny directive can be used to forbid it. Both of these options can occur more than once within a block and are handled based on the Order setting. Setting Order to Deny,Allow permits access to any host that is not listed in a Deny directive. A setting of Allow,Deny denies access to any host not allowed in an Allow directive. Like most other options, the most specific Allow or Deny option for a host is used, meaning that you can Deny access to a range and Allow access to subsets of that range. By adding the Satisfy option and some additional parameters, you can add password authentication. For more information about access control, see http://httpd.apache.org/docs/mod/mod_access.html. Note
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.

Chapter 24 . Running a Linux, Apache, MySQL, (My space web page)

Wednesday, August 15th, 2007

Chapter 24 . Running a Linux, Apache, MySQL, and PHP (LAMP) Server 655 Locations are configured in the form of a start tag containing the location type and a resource location, followed by the configuration options for that location, and finishing with an end tag. This form is often called a configuration block, and looks very similar to HTML. A special type of configuration block, known as a location block, is used to override settings for specific files or directories. These blocks take the following form: (options specific to objects matching the specifier go within this block) Different types of location tags exist and are selected based on the type of resource location that is being specified. The specifier that is included in the start tag is handled based on the type of location tag. The ones you generally use and encounter are Directory, Files, and Location. In this chapter, Location refers specifically to the third type of tag, and location refers generically to any of the three. . Directory tags are used to specify a path based on the location on the file system. For instance, refers to the root directory on the computer. Directories inherit settings from directories above them, with the most specific Directory block overriding less specific ones, regardless of the order in which they appear in the configuration files. . Files tags are used to specify files by name. Files tags can be contained within Directory blocks to limit them to files under that directory. Settings within a Files block will override the ones in Directory blocks. . Location tags are used to specify the URI used to access a file or directory. This is different from Directory in that it relates to the address contained within the request and not to the real location of the file on the drive. Location tags are processed last and override the settings in Directory and Files blocks. Match versions of these tags DirectoryMatch, FilesMatch, and LocationMatch have the same function but can contain regular expressions in the resource specification. FilesMatch and LocationMatch blocks are processed at the same time as Files and Location, respectively. DirectoryMatch blocks are processed after Directory blocks. Apache can also be configured to process configuration options contained within files with the name specified in the AccessFileName directive (which is generally set to .htaccess). Directives in access configuration files are applied to all objects under the directory they contain, including subdirectories and their contents. Access configuration files are processed at the same time as Directory blocks, using a similar most specific match order. Note
Check Tomcat Web Hosting services for best quality webspace to host your web application.

654 Part V (Best web hosting) . Running Servers Operating Your

Tuesday, August 14th, 2007

654 Part V . Running Servers Operating Your LAMP Server With the components of your LAMP server installed and running, you are ready to configure Apache and try it out. For this example, Apache is set up to serve content for your own domain using a feature called virtual hosting, after which you ll see how to install the Coppermine Photo Gallery program, which enables you to create an online photo gallery on your LAMP server. Editing Your Apache Configuration Files The configuration files for Apache HTTPD are incredibly flexible, meaning that you can configure the server to behave in almost any manner you want. This flexibility comes at the cost of increased complexity in the form of a large number of configuration options (called directives), but in practice there are only a few directives with which you ll need to be familiar. See http://httpd.apache.org/docs/ for a complete list of directives supported by Apache. In Debian, the Apache configuration is stored in text files read by the Apache server, beginning with /etc/apache/httpd.conf. Configuration is read from start to finish, with most directives being processed in the order in which they are read. Additional files may also be read based on the AccessConfig, ResourceConfig, and Include directives. On modern installations, the AccessConfig and ResourceConfig options point to empty files, and the traditional contents of those files have been moved to the main httpd.conf file. The Include directive is distinct from AccessConfig and ResourceConfig in that it can appear more than once and can include more than one file at a time. Files referenced by Include directives are processed as if their contents appeared at the location of the relevant Include statement. Include can point to a single file, to a directory in which all files are read, or to a wildcard that specifies a specific set of files within a directory. Subdirectories are also processed when Include points to a directory. The scope of many configuration directives can be altered based on context. In other words, some parameters may be set on a global level and then changed for a specific file, directory, or virtual host. Other directives are always global in nature, such as those specifying which IP addresses the server listens on, and some are valid only when applied to a specific location. Note Note
In case you need quality webspace to host and run your web applications, try our personal web hosting services.

Submit web site - Chapter 24 . Running a Linux, Apache, MySQL,

Monday, August 13th, 2007

Chapter 24 . Running a Linux, Apache, MySQL, and PHP (LAMP) Server 653 Access to databases within MySQL is managed based on account information stored within the mysql database. As with UNIX systems, the superuser account is named root. The default installation does not set a password on this account, and it creates an anonymous account and a test database that should be removed unless you are certain that you need them: # mysql -u root mysql Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 3 to server version: 4.0.24 Debian-10-log Type help; or h for help. Type c to clear the buffer. mysql> UPDATE user SET Password=PASSWORD( newpassword ) -> WHERE User= root ; Query OK, 2 rows affected (0.00 sec) Rows matched: 2 Changed: 2 Warnings: 0 mysql> DELETE FROM user WHERE User = ; Query OK, 2 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> DROP DATABASE test; Query OK, 0 rows affected (0.00 sec) mysql> q Bye The UPDATE command, as used in this example, changes the password for the MySQL root account (replace newpassword with the password you want to use), the DELETE command removes the anonymous user, and the FLUSH command tells the running MySQL server to reload the list of user accounts from the database. Finally, the DROP command removes the test database. How MySQL Databases Are Structured For those who aren t familiar with how a database system is structured, here s a quick introduction: . Databases are the basic organizational block in a database system. Most database systems (including MySQL) are designed to support multiple databases from a single server. This allows separate databases to be created for different users or different functions. . Tables are found within a database. A table is very much like a spreadsheet in that it has rows and columns. Columns define the different types of data that every entry can or must have, and every entry takes the form of a row. A database can hold multiple tables, allowing you to have many different data sets within a single database.
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.