0

On 16.04 Ubuntu, I want to run a cakephp app on the localhost to make some modifications. How can I do that? Installed application has files in 3 different directories:

  1. opt
  2. etc
  3. usr

I know apache files run on var/www/html but how can I move those installed files there to run the application? As far as I know, index.php is the start file of php projects but for cakephp, there is a default.ctp file for the main program page, of course there are other index.php files for other pages, and I am really stuck with that.

Thanks in advance.

1
  • I suggest you consult the many setup guides on the Internet Commented Jul 18, 2017 at 8:31

2 Answers 2

1

Copy your CakePHP project to a subfolder in Apache document root, eg /var/www/html/myproject. Make sure you have mod_rewrite enabled. Then you should be able to access your project at http://localhost/myproject.

More info: CakePHP Installation

As for files located in etc, opt and usr, it depends what they are. If you can share what you have there, please do it, as it will help to decide what to do with them.

Sign up to request clarification or add additional context in comments.

8 Comments

Thank you for the reply. I am now able to reach some of the pages but there is no style in any of the pages at all, some links are not working and the application itself is not working. I checked S.O for css problems and tried to edit .htaccess files and could not get any solution. Why these problems occur?
Your hrefs in links might be hardcoded, and if so it wont work after moving from original location without changes. Take a look at this answer, especially possible solution number 2: stackoverflow.com/questions/44601671/…
By the way, I just saw your edit I am sorry, the project is in the link below. It is basically a pcap file analyzer: www.capanalysis.net/ I want to run this program on localhost. I will check your reply thank you so much
On howto present on capanalysis site I see that after installation it should be available on localhost:9877, and there is no need to copy it. Do you have any errors when you try to connect to this?
No, it works just fine in that port. But I want to modifiy it, and I can modifiy it but, because of the fact that it works as a service (I need to run the following command in terminal for it to work: service capanalysis restart) its modified files recovers after executing that command. I don't know how that happens. I disabled the Internet connection and tried it, it recovered the files again interestingly. By files I mean, default.tcp (in the /opt/capanalysis/www/app/View/Layouts dir), some webroot files, etc.
|
0

I suggest using virtual hosts to run your project.

https://support.rackspace.com/how-to/set-up-apache-virtual-hosts-on-ubuntu/

Enjoy...

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.