
This is the first part of The Making of samisdat 2.0.
Actually it is part zero, because i start really nearly with zero and install a local apacheserver with MySQL and PHP.
A local host is extremely useful, because i can test everything on my own computer and upload it, when I’m sure it works.
In order to make it even more handy, I add a virtual host.
A vHost acts like an real server: It has has its own DocRoot and domain name. Afterwards this saves my much work, because i only have to replace .txp by .org and change some paths.
Screencast
The screencast shows the complete installation and configuration of the server. And the installation shown is really the one I will use in the further Redesign. That will be one principle of the complete Redesign: I make a step and describe it as much as exactly as possible. In the sense the Live Redesign is really live.
The screencast is made by Wink. The English version is without audio, because I have only a German mic.
In addition to the screencast, you can read the whole step on the following pages.
XAMPP
I use XAMPP by Apache Friends as local server.
This one contains everything what I need to run Textpattern and the installer is doing nearly the complete configuration.
XAMPP is the simplest way to get a local server.
Automatic installation and while Windows ignores access rights (755, 777 etc.) I don’t have to care about them.
Even someone who never get in touch with a local host can install XAMPP within half an hour.
Install
First of all I download and start the XAMPP Installer.
I can choose where to install it and because i want to know what I put where, i choose:
C:\localhost
The installer copies all files and take care for the configuration of the server.
Testing
Straight after the install is finished, I can see my local server:
Just start the server, open a browser and point to localhost oder 127.0.0.1.
Configuration
Textpattern uses mod_rewrite for the clean URLs and I have to active the module.
I open the file C:\localhost\xampp\apache\conf\httpd.conf and uncomment the line 116:
All other configurations have been done by the installer.
Virtual hosts are very usefull: I can host several projects on a local server and define a vHost for each project.
Instead of http://localhost I can use a different domain and a different DocRoot. I use samisdat.txp testing samisdat.
While using vHost I don’t have to use sub dirs (f.e. http://localhost/samisdat) on my local server and afterwards uploading is much more easy: Just replacing .txp by .org and changing the paths.
Set up
Virtual Host are defined in
C:\localhost\xampp\apache\conf\extra\httpd-vhosts.conf
First of all I have to tell the server which IP should be attented:
The file httpd-vhosts.conf contains a template for vHost:
I don’t need most of these entries. I define only a DocRoot and a server name. First defining localhost, because I don’t want to break that one:
Now i set up samisdat.txp
By the way samisdat.com would be also possible. But I always use TLD which are not in use in the real internet and which I can remember: For example .txp for Textpattern projects, .pc for my desktop and .not for a local server on my notebook.
hosts
I have defined the vHost samisdat.txp, but before I can acess thisone, I have change the file hosts.
This file is something like my very own DNS server. It connects IPs with hostnames.
While operating with Windows XP I find the file hosts at
C:\WINDOWS\system32\drivers\etc.
By default it should contain only one entry:
For every vHost I add another:
Browser Preferences
Now I have to tell my browser, that he should use the hosts file instead of DNS Server.
This preference should be (I don’t know exactly, because I’m using a German Firefox):
Extras > Preferences -> Advanced> Network.
There is an entry called No Proxy, it should contain:
I add .txp:
.txp is enough and I don’t have to change this pref, if I add another .txp vHost.
In every browser this preference is named a little different and every browser separates the servernames in a other manner:
Firefox seperates by , while IE by ; and Opera wants a new line for every entry.
Last but not least I have to create the dir /samisdat.
I defined that one as DocRoot fpr samisdat.txp and if that one isn’t existing, I’ll get errors starting the server.
So creating
C:/localhost/xampp/htdocs/samisdat.
Thats it. Restart the server and as a little test I create
C:/localhost/xampp/htdocs/samisdat/index.php:
After pointing my browser to http://samisdat.txp, I see my very first PHP script locally served:
That was the first part of The Making of samisdat 2.0.
I now have a local server with PHP and MySQL and a virtual host on it.
If You liked this first part or if you questions or remarks: Please leave a comment.
I hope I see you at
The next step
I have done everything to install Textpattern 4.0.4 in the second part.
This one will also contain the first plugins: bas_toc which paginates articles and deliveres the table of contens and bas_code which displays all the code examples.
Links
If you want to read on:
Wikipedia:
Comments
<a href="http://www.geocities.com/analptsweet/jhpno/secretary-and-boss-sex.htm">secretary and boss sex</a>
brittany spears naked http://www.geocities.com/teendtiwoman/sqqpa/brittany-spears-naked.htm
[url=http://www.geocities.com/teenavcteeny/dfqnq/bbw-free-porn-trailer.htm]bbw free porn trailer[/url]
<a href="http://www.geocities.com/girlsnmehpretty/byqvd/sexy-lingerie-movie.htm">sexy lingerie movie</a>