Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm emulating Ubuntu on my mac, and I use it as a server.

I've installed lighttpd + Drupal and the following configuration section requires a domain name in order to make clean urls to work.

Since I'm using a local server I don't have a domain name and I was wondering how to make it work given the fact the ip of the local machine is usually changing.

thanks

$HTTP["host"] =~ "(^|\.)mywebsite\.com" {
  server.document-root = "/var/www/sites/mywebsite"
  server.errorlog = "/var/log/lighttpd/mywebsite/error.log"
  server.name = "mywebsite.com"
  accesslog.filename = "/var/log/lighttpd/mywebsite/access.log"
  include_shell "./drupal-lua-conf.sh mywebsite.com"

  url.access-deny += ( "~", ".inc", ".engine", ".install", ".info",
       ".module", ".sh", "sql", ".theme",
       ".tpl.php", ".xtmpl", "Entries",
       "Repository", "Root" )


  # "Fix" for Drupal SA-2006-006, requires lighttpd 1.4.13 or above
  # Only serve .php files of the drupal base directory
  $HTTP["url"] =~ "^/.*/.*\.php$" {
      fastcgi.server = ()
      url.access-deny = ("")
  }

  magnet.attract-physical-path-to = ("/etc/lighttpd/drupal-lua-scripts/p-.lua")

}
share|improve this question

1 Answer 1

up vote 0 down vote accepted

The fastest (quick&dirty) way is to edit your hosts file: http://decoding.wordpress.com/2009/04/06/how-to-edit-the-hosts-file-in-mac-os-x-leopard/ Add: 10.10.10.1 mywebsite.com Replace 10.10.10.1 with the IP of your Ubuntu instance.

share|improve this answer
    
It is not enough. I also have to add it to Ubuntu network configuration. Because I need to use it in configuration file. And since the ip changes, I should update twice the ips on both operating systems... –  Patrick Dec 29 '10 at 12:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.