Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

Thursday, 21 March 2019

Allow access of WAMP server from another system (Forbidden : You don't have permission to access / on this server.)

When we install WAMP server on new system, if it is installed successfully, it works fine on system, but when we try to access it from another system we got error like-



Let see how it can be resolved ?

For WAMP server > 3

Click on WAMP icon in the tray of icons situated in right hand side of task bar. Then click on Apache -------> httpd-vhosts.conf



httpd-vhosts.conf file will be opened with following text -

# Virtual Hosts
#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
  </Directory>
</VirtualHost>

Change Requie local line to Require all granted

Now httpd-vhosts.conf will look like -

# Virtual Hosts
#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
   Require all granted
  </Directory>
</VirtualHost>

Then save the file and restart the server.

You should also check the colour of WAMP server icon in tray, it should be green.

For WAMP server < 3


If you have installed WAMP server version less than 3, the you have to change in httpd.conf file and search offlineonline tag in the file and replace it from

#   onlineoffline tag - don't remove
    Order Deny, Allow
    Deny from all

to


#   onlineoffline tag - don't remove
    Order Allow,Deny
    Allow from all

and save the file then restart the server.

Another way to resolve it to check that server is offline or online.

Click on WAMP icon in tray and the click on Put Online (See the WAMP icon in Offline Mode and Online mode, there is a change in icon)





Monday, 5 September 2016

Automatic startup of Apache Tomcat server in ubuntu on system startup

Apache tomcat server is used to run JSP/Servlet applications. When we install tomcat in Ubuntu/Linux it does not start automatically on system startup. We have to start it manually after system startup. In windows machine it is very simple to start Tomcat on system startup. We can just configure the tomcat service to automatic and it starts on system startup, But when we use tomcat in Ubuntu/Linux, it becomes sometime complex to start tomcat in system startup.

Some people suggest write to shell script to start tomcat, writing shell script is again complex. I have applied many methods to start tomcat in Ubuntu automatically, but I found this method is very simple to start Tomcat in Ubuntu.

Go to rc.local file in etc in root folder and open it with root privileges. Write the startup.sh path in this file and save.

sleep 10
/home/arvind/apache-tomcat-8.0.32/bin/startup.sh


Change image source dynamically on hyperlink

 Changing image source dynamically using JQuery. Here in this example I have created there hyperlink and stored all images in the same folde...