I wish to set my very own sever to operate my ruby on rails project(with passenger wordpress plugin). I personally use Apache2 on Ubuntu11.04(sever version).

It's my very first time to make use of Apache and that i read some documents.

All of the paperwork request me to create SeverName,for example Apache doc and ubuntu docs.

Regrettably, I do not possess a domain title, can one just set Ip and employ Ip to gain access to this sever? Whether it's ok, how must i do?

It is the config sample distributed by passenger:

<VirtualHost *:80>
   ServerName www.yourhost.com
   DocumentRoot /somewhere/public
   <Directory /somewhere/public>
      AllowOverride all
      Options -MultiViews
   </Directory>
</VirtualHost>

Thanks!

/etc/apache2/httpd.conf

<VirtualHost *:80>
          ServerName example.com
          DocumentRoot /home/urpc-name/RailsApps/anything/public
          <Directory /home/webonise/RailsApps/anything/public>
             RailsEnv development
             AllowOverride all
             Options -MultiViews
          </Directory>
     </VirtualHost>
  1. In server title:choose ur virtual title...u can pick anything
  2. In document root and directory,give your rails project path
  3. Choose rails atmosphere in RailsEnv

/etc/hosts

127...1 example.com

  1. Put server title in virtual host-127...1 may be the localhost

  • Then just see your browser and kind example.com

Hope this can help

Comment the line:

# NameVirtualHost *:80

Comment out any <VirtualHost> blocks.

Discover the line:

DocumentRoot "/var/www/html" # or whatever your config uses for the overall apache document root.

Change it out for your rails application's root.

DocumentRoot "/somewhere/public"

Adding your other config configurations to some <Directory> block.

<Directory /somewhere/public>
  AllowOverride all
  Options -MultiViews
</Directory>

I've not examined this without a doubt, however, you should have the ability to reach it by only going to the Ip. Make certain you've Passenger installed, have run passenger-install-apache2-module, and also have added the right module loading lines for your apache config.