- Home »
- Page with a long title »
- Subpage with also a long title »
- Subsubpage with again a long title »
- Current location
Fix sudo and path environment variable on Ubuntu
Due to Ubuntu using secure_path in sudo you can’t change the $PATH environment variable. Thanks to http://serverfault.com/questions/182995/problems-with-sudo-in-path I fixed it in my ~/.basrc with an alias:
alias sudo='sudo env PATH=$PATH $@'
This allows me to add my ~/Scripts/bin path for personal scripts that make my life easier while allowing those scripts to be run with sudo.
WordPress Multisite setup hints and tips
Local installation
Installing WordPress (or actually any webapplication) without a domain is annoying and might cause issues. Therefor I always create a fake local domain name to use with my project. I use a nice little script based on Paul Gibson’s OSX virtualhost script which automates the first three steps below.
1. Create a local domain by adding a fake domain name to your hosts file. In this case I use ‘testproject.mine’ as the domain name. In my hosts file I point this domain name to my own local machine. Here’s an example of my hosts file:
testproject.mine 127.0.0.1
anotherproject.mine 127.0.0.1
secret-project.mine 127.0.0.1
2. Setup a Virtualhost in Apache. I use Apache (2.2.14-5ubuntu8.4) on Ubuntu Linux. Check the manual for info on the configuration files. In the main Apache configuration (usually httpd.conf, in my case apache2.conf) I have the following lines:
NameVirtualHost 127.0.0.1
Include /etc/apache2/sites-enabled
The first line with the NameVirtualHost tag binds the local IPv4 ip-address to the Virtualhosts. In the Virtualhost config I also need to use this ip-address as you will see. The second line will include my site aka Virtualhost specific configurations located in /etc/apache2/sites-enabled. In this directory I have a file testproject.mine which contains the VirtualHosts configuration file for ‘testproject.mine’:
DocumentRoot /home/bjorn/Sites/testproject.mine
<VirtualHost 127.0.0.1>
ServerName testproject.mine
<Directory /home/bjorn/Sites/testproject.mine> Options All
AllowOverride All
</Directory>
</VirtualHost>
As you can see I have a VirtualHost tag which uses the same ip-address as the previous NameVirtualHost on the first line. Within this tag I have several others. Most importantly I have set the DocumentRoot, which points to a directory with all the files I would like serve with Apache (make sure the Apache user has access to this!) and a tag ServerName which is used to uniquely identify a virtual host, when using name-based virtual hosts.
In other words it makes sure that this particular VirtualHosts’ config is loaded when browsing to http://testproject.mine Between the Directory tags are some directives in dealing with this directory. In this case I’m leaving it very open (not recommend for production!) by setting AllowOverride to All and Options to All. This makes it very easy to alter options with an .htaccess.
Interview bij Xpert CMKB
Naar aanleiding van mijn deelname aan het door Xpert CMKB en Culturele Zondagen georganiseerde auteursrechten gesprek/debat staat er nu een interview met mij op de site van Xpert CMKB. Zie hier voor het interview: http://www.xpertcmkb.nl/?p=1618
Contactgegevens
Terzijde
The first step — especially for young people with energy and drive and talent, but not money — the first step to controlling your world is to control your culture. To model and demonstrate the kind of world you demand to live in. To write the books. Make the music. Shoot the films. Paint the art.Chuck Palahniuk
