Browsing articles tagged with "vhosts - Admins Goodies"
Jan 24, 2013
tom

Nginx rewrite rule “^/([a-z0-9]{32})\.png$” not working (used to work on Apache)

I have these rewrite rules (I tried both with no avail): location ~* “^/([a-z0-9]{32})\.png$” { rewrite ^ /index.php?page=log&id=$1 last; } and location ~* “/(?<hash>[a-z0-9]{32})\.png” { rewrite ^ /index.php?page=log&id=$hash; } and location / { try_files $uri $uri/ @rewrites; }location @rewrites { rewrite “^/([a-zA-Z0-9]{32})\.png$” /index.php?page=log&id=$1 last; #… } Basically, I want the URL http://example.com/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.png to actually pass the parameters to my index.php script, and in the script, I got: $db->save_hash($_GET['id']); header(‘Content-type: image/png’); readfile(‘images/beacon.png’); break; But nginx is [...]

Continue Reading »
Dec 27, 2012
tom

vhost setup for multiple SVN repositories on same server

I have 2 svn repos on my EC2 instance. They are located in /ebs/svn/repo1 & /ebs/svn/repo2. I have created a domain alias svn.mydomain.com, to point to the parent directory of above (/ebs/svn). I woud like to access each of the above repo’s using the following URL format: svn.mydomain.com/repo1 svn.mydomain.com/repo2 Currenly I have the repo1 working with the following vhosts config. <VirtualHost *:80> ServerName svn.mydomain.com ServerAlias svn.mydomain.com ErrorLog /var/www/html/log/svn.mydomain.com-log <Location “/” > DAV svn SVNPath /ebs/svn/repo1 [...]

Continue Reading »
Dec 16, 2012
tom

Apache2 default vhost in alphabetical order or override with _default_ vhost?

I’ve got multiple named vhosts on an Apache web server (CentOS 5, Apache 2.2.3). Each vhost has their own config file in /etc/httpd/vhosts.d and these vhost config files are included from the main httpd conf with… Include vhosts.d/*.conf Here’s an example of one of the vhost confs… NameVirtualHost *:80 <VirtualHost *:80> ServerName www.domain.biz ServerAlias domain.biz www.domain.biz DocumentRoot /var/www/www.domain.biz <Directory /var/www/www.domain.biz> Options +FollowSymLinks Order Allow,Deny Allow from all </Directory> CustomLog /var/log/httpd/www.domain.biz_access.log combined ErrorLog /var/log/httpd/www.domain.biz_error.log </VirtualHost> Now [...]

Continue Reading »
Nov 13, 2012
tom

Is it possible to have multiple ‘s in a vhost.conf?

My webserver is running Plesk and for each new site a vhost.conf file is created that has some include_path and open_basedir settings in it: <Directory /var/www/vhosts/website.nl/httpdocs> php_admin_value open_basedir “/usr/share/pear:/var/www/vhosts/global.website.nl/httpdocs/global:/tmp:/var/www/vhosts/website.nl/httpdocs” php_value include_path “/usr/share/pear:/var/www/vhosts/global.website.nl/httpdocs/global” </Directory> Is it possible to add another for this site and have the include_path and open_basedir setting change for a subdirectory like this: <Directory /var/www/vhosts/website.nl/httpdocs/subdirectory> php_admin_value open_basedir “/usr/share/pear:/var/www/vhosts/global.website.nl/httpdocs/global2:/tmp:/var/www/vhosts/website.nl/httpdocs/subdirectory” php_value include_path “/usr/share/pear:/var/www/vhosts/global.website.nl/httpdocs/global2″ </Directory> Asked by tvgemert If you meant …/domain.com/conf/vhost.conf file – these files [...]

Continue Reading »
Aug 23, 2012
tom

Apache virtual host configured with a sym-link to a folder in my user directory fails with 403 Forbidden

I’m sure someone has asked/answered this before but my search hasn’t helped me much so… I have Eclipse IDE installed on my Linux box (LM13) with the ‘workspace’ folder located @ /home/user/projects/workspace I have Apache installed and set-up, working with various vhosts all of which have their folders somewhere under the web-root /var/www/… The problem I’m having is that the vhost I’ve configured for a project in my Eclipse Workspace can’t be accessed by Apache, [...]

Continue Reading »
Jul 15, 2012
tom

How to diagnose DNS virtual domain 404s

Until a few days ago I was hosting a single domain on my Server. Now I’ve added a second domain via apache virtual hosts. Both domains are name based and hosted from the same IP. Now my logs show me that some relative paths are called on the new domains application that obviously belong to the old domain. It seems that all these calls come from searchengine bots and I can still access the two [...]

Continue Reading »
May 25, 2012
tom

Website on nginx server requested from subdirectory

we have two nginx servers. The first server receives a request via www.example.com/partner. He sends the whole request to the second server which has php+fastCgi configured. Nginx access log from second server: “GET /partner/ HTTP/1.0″ 200 2845 On the second server I have a vhost that looks like that: server { listen my.ip:80; server_name www.example.com; root /var/www/example; if ($http_host != “www.example.com”) { rewrite ^ http://www.example.com$request_uri permanent; } index index.php index.html; location = /partner/favicon.ico { log_not_found [...]

Continue Reading »
May 16, 2012
tom

Subdomain always redirects to main domain. Why?

when I request site1.example.com I get redirected to example.com. In /etc/apache2/sites-available/ I have setup a site1.example.de file with following content <VirtualHost *:80> ServerName site1.example.com DocumentRoot “/var/www/vhosts/example/site1″ <Directory /var/www/vhosts/example/site1> Allow from all AllowOverride All </Directory> </VirtualHost> After sudo a2ensite site1.example.com and reloading apache it still redirects me to main domain. Any ideas why? I use apache2/2.2.14 (Ubuntu 10.4). My server is acting as nameserver. Asked by ArtWorkAD Those wacky configs from /var/www/vhosts/ (looks like they’re from [...]

Continue Reading »
May 13, 2012
tom

Managing lots of Apache vhost ServerAliases

So I’ve got this site that’s being served as a virtual host by Apache 2. And it has a metric ton of alternative domain names that are all supposed to resolve to it. Up to now I’ve handled things like this by adding the extra domains in the ServerAlias list in the vhost configuration file. But as the number of aliased domains has grown longer, that list has gotten extremely long and unwieldy. It also [...]

Continue Reading »
May 12, 2012
tom

Ip address goes to lowest alphabetical domain on server

If I type in my server ip address into a browser, it always goes to the lowest alphabetical domain on my server. So if I had these domain on my server: zty.com typ.com dfo.com …typing in the ip would take you to dfo.com. If I then add abc.com to my server, typing the the ip in a browser would go to abc.com How do I make the ip go to the primary domain on the [...]

Continue Reading »
Pages:12345678»