PHP JAVA Bridge - linux

I am very new to Linux but I am trying best to learn. We have dedicated hosting server of CentOS 6. It is configure with Apache Server as our public website. Now we need to install PHP JAVA Bridge on it.
What I did is, I install TomCat 6 and jdk 1.6. Then I copy JavaBridge.war file to $CATALINA_HOME/webapps folder and jar files on $CATALINA_HOME/lib folder. When I check from tomcat 8080 port JavaBridge is working very good.
Then I make symlink of $CATALINA_HOME/webapps/JavaBridge on my apache server. Untill here everything is okay
But when I try to browse from browser like http://www.xxx.com/JavaBridge I will get following error
You don't have permission to access /JavaBridge/ on this server.
Apache Server at www.gizeleonline.com Port 80
Now my question is that do I am doing it in wrong way or do I have to get rid of Apache server or I am missing something.
Kindly help on this experts :)

Actually it was my mistake. I just re-image my server and re-install everything it start working everything. thanx for help every body

Related

Serving Node.js files from a LXC Turnkey container -Apache configuration needed?

I hope that I will not waste everyone's time, nor embarrass myself, but please hear/read my problem. I am new to this, so please bear with me.
Someone at work wrote a crude code in Node.js and I can see the .html files by having localhost: 8080 as the URL in the browser, while having the VisualStudio starting the npm with npm start command. Am I explaining this clear enough?
The webpages are displayed and all, but now comes the hurdle.
How can i have those pages served from a a Linux server?
If by analogy, I put some.html page inside the /var/www/ in a Apache server, pointing to the server's IP/somepage.html i can visualise it, what needs to be set up on a similar Node.js server?
Where do I have to put those files, inside what directory and what configuration is needed?
I thought to create a small LXC container and have those files and services saved as a template, but first I need to set this up correctly. Can Apache serve those files, do I have to make another configuration first?
I have those files served from a Windows machine from local host, and put the same files in a /node ,/opt/ www directory in a Linux machine, but no dice.

Linking in localhost(LAMP)

I am newly(about 1 month) started using LAMP and Bootstrap.
I developed a web-site that worked perfectly until I reinstalled LAMP.
Here my progress:
0. reinstalled LAMP
1. moved my "backup-ed" file to my "localhost" direction
2. I run "chmod 777 *" to each dir and file
3. When I write "localhost" to my browser(firefox) the "index.html" is running
4. When I click the link(say: index)
The browser responds:
http://localhost/undefined
Not Found
The requested URL /undefined was not found on this server.
Apache/2.4.7 (Ubuntu) Server at localhost Port 80
Is there any way to fix this, by the way it's working(linking) perfectly when I write file:///var/www/html/index.html.
The reason why I want to use LAMP is add .php files to handle form.
Thanks
What happens when you do hit http://localhost ?
What exactly do you see?? Tried http://localhost/html
What is exactly your document root as per apache conf?
You might need to check that you are placing your files in the root directoy. It should be in the "htdocs" foler.
/opt/lampp/htdocs/
If all else fails, you can try using xampp which is another free alternative to lamp.
I get this a lot, when your browser looks for a file that is not in htaccess you get a forbidden or unfound error. The way to fix this is to make sure the link you click goes to an accessible URL. Try finding if other links in the page or scripts are overwriting your link.
Finally check if you can access it from another browser, or try to demonstrate the security of your machine. From a public library you can request an Ubuntu CD from canonical, and while you're waiting, you can visually inspect your machine for tampering.

Beginner - setting up local host for Angular app using XAMPP on Windows 7

I have taken a Angular App which works on Local host when I use visual studio IIE server.
I don't want to use Visual Studio and I am trying to test the app locally using XAMPP.
I am a complete beginner, and I cannot get the local host to pick-up the html initialization file. I have checked the following:
Skype is off and the port is set to 80 in XAMMP
the root server in HTTPd.conf is setup correctly (no slash at end)
I am getting a little confused as to 'how' angular will work on the XAMMP local host.
Do I need to get Yeoman or grunt (seen these apps in some posts, but they seem to be for command line environment).
Any help, or even a pointer to a step by step set-up would be great!
Angular is no different from a normal html web page, when it comes to working in a localhost.
Does your XAMPP work with standard HTML files?
Do you have any error generated?
OK. Got this sorted. I was over complicating things entirely, angular runs sweet on regular XAMPP, no Grunt/ Yeoman etc. required.
All you need to do is: 1. install XAMPP 2. Close Skype 3. Place you app, libraries and everything else in the folder C:\xampp\htdocs\
localhost/Angularappstartpage.html
BOOM!
it works.
You may need to adjust the port number on the localhost (default is 80 e.g. localhost:80/...)
You can also change the root folder in your XAMPP config setup to point to your local GIT.
Do this by changing the line in the HTTPD.conf file (click 'config' on the apache module)
DocumentRoot "C:/xampp/htdocs" to DocumentRoot "C:/myLocalGIT"
Hopefully this will help all the new guys out there. Good luck!
Skype blocks the port 80, which is used for browsing. XAMPP uses the same port so exactly.
https://support.skype.com/en/faq/FA148/which-ports-need-to-be-open-to-use-skype-for-windows-desktop
If you use mysql, also open first XAMPP and start your services and then keep working on your SO as always.

How to install nodejs on Xampp localhost

Been seeing a lot of how to's on how to install nodejs but nothing is at all clear.
So I ask...
Can someone provide a step by step installation guide for installing and using nodejs on a xampp server?
After searching (source), I have found, that it's easier to install Node.js directly (so, no need of XAMP/WAMP):
Install http://nodejs.org/download/
Create a test file (example) C:\myFolder\test.js and put this code in that file:
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/');
Open CMD (COMMAND PROMPT) and execute:
node C:\myFolder\test.js
Open this address in your browser: http://127.0.0.1:1337/
Now It's really easy to install and use Node.js even with Apache if you are using Xampp/Wamp etc. Because unlike old days, now Node.js org has created MSI installer for windows.
Below are the steps to install Node.js with Apache. It is assumed that you have already installed xampp
Download windows installer of Node.js from it's site http://nodejs.org/ click on download. Hit the Node.js website and click the big green Install button. It'll detect your OS and give you the appropriate installer. If for some reason it doesn't, click the downloads button and grab the one you need. Run the installer. That's it, you have installed Node.js and, equally, NPM – Node Package Manager – which lets you add all kinds of great stuff to Node quickly and easily.
Note
Keep your Apache and Node ports different. Declare Node port other than 80 or 8080 while creating server in Node because these are the default ports of Apache.
May be these Notes may help someone in future.
1) When Node.js is installed Node and NPM become available globally. Means that you can create your site anywhere on your hard drive and with command prompt go to your directory like in Windows Command prompt
d:/NodeSite/node server.js
and now you can access it via
http://localhost:3000
because your server.js is running with node.
2) Similarly, you can install any Node Package like installing Memcached package or Library
d:/NodeSite/npm install memcached
"NodeSite" is a folder contain your project.
You can see that node and npm have become globals.
It is possible to run NodeJS trough Apache/XAMPP. Great tutorial how to setup httpd.conf / vhosts.conf http://thatextramile.be/blog/2012/01/hosting-a-node-js-site-through-apache
<VirtualHost 109.74.199.47:80>
ServerName thatextramile.be
ServerAlias www.thatextramile.be
ProxyRequests off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
ProxyPass http://localhost:3000/
ProxyPassReverse http://localhost:3000/
</Location>
</VirtualHost>
In the end it would be accessible trough port 80 thatextramile.be
I never gave a lot of answers on this site. Because most of the time I'm not an expert however. I had the same issue a while back.
1) You don't really need this XAMPP. Node will create its own http_server so I suggest you just forward calls from XAMPP to the Node app.
2) a good start would be: nodeguide.com/beginner.html
3) I work with PHPstorm which is very nice for Node.js development.
3a) Node.js plugin -> https://www.jetbrains.com/phpstorm/help/installing-updating-and-uninstalling-repository-plugins.html
3b) read this: http://blog.jetbrains.com/webstorm/2014/01/getting-started-with-node-js-in-webstorm/
3c) running: http://blog.jetbrains.com/webstorm/2014/02/running-and-debugging-node-js-application/
3d) Test your app.
You mighht also need this:
4) (MysQl db) https://codeforgeek.com/2015/01/nodejs-mysql-tutorial/
XAMPP and a node.js is two different things, which do not need to work together, nor do they need each other.
XAMPP consists of Apache, MySQL, PHP and Perl.
Where node.js is just like PHP or Apache, so an application.
Node.js can be installed from the website, http://nodejs.org or via the terminal following these instructions:
https://github.com/joyent/node/wiki/Installation
If you want to run javascript from apache you can do it as CGI module. It wont be exacly node.js server and performance because Apache is your server, but you can execute node.js like scripts http://www.cgi-node.org/
You must add a handler to your apache configuration to handle whatever extension files for example .jss via CGI modlue that essentially calls node(.exe) depndeing if linux or windows. I made it work under Bitnami WAMP
It is not possible to install NodeJs on Xammp.
Because Xammp is is simply a tool where Apache,MySql,FileZilla,Tomcat and Mercury server are available. Where you will be able to only configure and use these server.
If you want to install Nodjs on Windows Machine, You will have to install it manually.

Xampp not working on Linux

I recently installed Linux and Xampp server. I had been working on it last night and this morning without any problems. This morning I started working the zend framework. Everything was going well until I had to restart my computer.
After restarting, when I tried to access localhost I was getting this message in my browser:
It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.
I have restarted xampp and apache. In the httpd.conf file I have changed the port from 80 to 8080. I'm running php 5.4.6. I have also reinstalled xampp just to be sure.
As far as I can tell, the only alterations I made outside of the zend project directory were the httpd.conf file. I changed "allowOverride None" to "allowOverride AllowAll". I also installed Composer and phpUnit, though I can't imagine how they would have caused the problem.
Any help you can throw my way would be great. I'm very stuck with this.
This is the default content of index.php or index.html file. Try rename these files.

Resources