Unable to point my site on Domain_Name or IP_Address

77 views Asked by At

I have completed following apache2 confirmation

<VirtualHost *:80>
  ServerName start.example.com
  DocumentRoot /var/www/start.example.com/public/
  <Directory "/var/www/start.example.com/public/" >
    AllowOverride all
    Allow from all
    Options -MultiViews
      RailsBaseURI /rails
    RailsEnv production
    RewriteEngine On
  </Directory>
</VirtualHost>

I set file in /etc/apache2/site_availables/start.example.com.conf

same file set in site_enables

service start succesfully but it's not point to my domain name or ip address.

I don't getting what's wrong with this.

Please Help Me. Thanks In Advance.

1

There are 1 answers

0
Naincy On

In Document Root or Directory, you need to give the path of your project.

<VirtualHost *:80>
  ServerName start.example.com
  DocumentRoot /var/www/projectName/public/
  <Directory "/var/www/projectName/public/" >
    AllowOverride all
    Allow from all
    Options -MultiViews
      RailsBaseURI /rails
    RailsEnv production
    RewriteEngine On
  </Directory>
</VirtualHost>

After this, need to restart apache2 server.

sudo service apache2 restart

Now, last step go to hosts file

  • Ubuntu : /etc/hosts
  • Windows: C:\Windows\System32\Drivers\etc\hosts

Add, your host here

127.0.0.1      start.example.com

Now, Browse! It will work.