RUN HTML TEMPLATE IN APACHE2 LOCALHOST

When we want to run the html template or html page like :-

URL:-
     file:///home/rohit/Desktop/index.html

We can also run the application in the localhost:-

URL:-
      localhost/index.html

Install Apache:-

sudo apt-get install apache2
then goto the 
/etc/apache2/sites-available/000-default.conf

DocumentRoot /home/rohit/Downloads/html_pages
instead of :-
#DocumentRoot /var/www/html
Then go to the :-

/etc/apache2/apache2.conf

<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>

<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>

<Directory /home/rohit/Downloads/html_pages>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>
then run:-
In the URL :-

localhost/
 
 
We can also refer :-
 
https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Set_up_a_basic_working_environment 

Comments

Popular posts from this blog

psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

CARRIERWAVE - UPLOAD ANY MEDIA (AUDIO , VIDEO AND IMAGE ) FILE IN RAILS

SELECT COUNTRY WITH STATE AND IT'S CITIES RAILS

RAILS: UPLOADING PHOTOS VIA AMAZON S3 AND PAPERCLIP (UPLOADING FILES TO S3 IN RUBY WITH PAPERCLIP)

SEARCHING USING AJAX IN RAILS

UPLOAD ANY MEDIA FILE IN RAILS USING PAPERCLIP

CURL COMMAND ON RUBY ON RAILS

UNINITIALIZED CONSTANT PAPERCLIP::STORAGE::S3::AWS

CHECK PASSENGER RUBY PATH