Root directory of laravel project in Cloud9 - laravel-5.1

now it's showing home page softenum-softenum.c9users.io/public/
it's my site but i could not make root or homepage in softenum-softenum.c9users.io.
Every time I was trying to change DocumentRoot /home/ubuntu/workspace/ to DocumentRoot /home/ubuntu/workspace/public
But I was not saved by F2 pressing.
Please help me.

I've got the same error.
The steps are:
// Change this line DocumentRoot /home/ubuntu/workspace
// To following DocumentRoot /home/ubuntu/workspace/public
Press F2
Then 'Y'
Then ENTER
You were missing the ENTER to save it.

Related

Remove Bitnami Jenkins Access page

I have bitnami jenkins installed.
I have no problem with the url http://yourhost/jenkins but i need to delete the Bitnami Welcome page. is any idea?
The documentation (https://wiki.bitnami.com/Components/Bitnami_info_page) says that the bnconfig tool should be used. However for me this doesn't work and I changed it manually in the apache configuration files.
To do so, change in file /opt/bitnami/apache2/conf/bitnami/bitnami.conf the lines:
<VirtualHost _default_:80>
DocumentRoot "/opt/bitnami/apache2/htdocs"
and
<VirtualHost _default_:443>
DocumentRoot "/opt/bitnami/apache2/htdocs"
into:
<VirtualHost _default_:80>
DocumentRoot "/opt/bitnami/apps/jenkins/htdocs"
and
<VirtualHost _default_:443>
DocumentRoot "/opt/bitnami/apps/jenkins/htdocs"
Then restart apache:
sudo /opt/bitnami/ctlscript.sh restart apache
This si brutal but it works, and the vhost (http://yourhost/jenkins should also work) :)
Note that the main documentation (https://wiki.bitnami.com/Native_Installers_Quick_Start_Guide) says in part "How to change the default page that appears when accessing the installation?" that changing it manually is the way to go, but suggest to use a modified version of the main page. I guess this is fine if you have several apps installed.

Changing the root directory in WAMP

I'm looking to change the root directory to point the directory to the following location:
C:\Documents and Settings\User\My Documents[documents]\wamp
I know that I have to change the apache http.conf file in the following lines
DocumentRoot "c:/Documents and Settings/User/My Documents/[documents]/"
However, it seems that the square brackets besides [documents] are causing the Forbidden Error to be displayed:
Forbidden
You don't have permission to access /login/ on this server.
Is there any way to use square brackets in the directory tree? [documents] is named for a particular purpose, and it needs to stay that way. Otherwise, I will need to do alot of recoding.
What are the rules if any when pointing to a directory tree?
Thanks in advance.
I was getting same forbidden error (In windows machine for wamp), after lot of r & d I found that there is need to change default virtual host in httpd-vhosts.conf file which is present in:
C:\wamp\bin\apache\Apache2.2.17\conf\extra
(change directory c:/wamp/www to what you want)
From :
ServerAdmin webmaster#localhost
DocumentRoot “c:/wamp/www”
ServerName localhost
ErrorLog “logs/localhost-error.log”
CustomLog “logs/localhost-access.log” common
To:
ServerAdmin webmaster#localhost
DocumentRoot “E:/wamp/www”
ServerName localhost
ErrorLog “logs/localhost-error.log”
CustomLog “logs/localhost-access.log” common
Right click your folder, select properties, then go to security tab. Edit proper permission for that folder so that apache user can have permission to access that folder.
I have tested that scenario in my system and DocumentRoot folder with bracket inside the name can work without problem.
Just in case someone comes across this as I did.
I had permissions problems on the parent folder of the directory I was trying to set as the DocumentRoot.
I found allowing the SYSTEM user Full Control privileges fixed the problem.
If you have permission problems (403 denied), and you are using newer WAPMs, e.g.
-wampserver2.5 with
-Apache-2.4.9
-Mysql-5.6.17
-php5.5.12-64b
you may want to check httpd.conf code (ca #240):
AllowOverride none
Require all denied
and change it to:
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Also, you may want to: take a look at this

Apache and rails

guys.
OK. Trying to deploy a rails project on apache. Ive deleted the public/index.html file. I cant get past the "It works!" screen. Im guessing this is a routing issue - Ive got to give it the right document root so that it can find the homepage of the app I have created, right? Problem is, Ive tried everything - anything outside of the public folder doesnt seem to exist. Here is my apache sites-available file:
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot /home/feenix/public_html/CRRC/public
</VirtualHost>
I changed the rails root to "home#index". Ive tried that as a document root for apache and it doesnt recognise it. Any help would be appreciated, as to where I should be looking for the correct document root - do I have to add something to the public folder in the rails project? Any help will be gratefully appreciated.
Cheers
It works! is the Apache default. That means you aren't pointing properly at Rails yet.
You've got the DocumentRoot correct.
Do you have NameVirtualHosts *:80 setup? Also, is Passenger enabled? I'm assuming you're using it.

Trouble deploying a Rails app (Linode, Passenger)

I'm a brand new Rails user, I'm following this tutorial- http://ruby.railstutorial.org/chapters/a-demo-app#top . Had no issues accessing the demo app (from Chapter 2) on the local server. However having issues deploying to my Linode server. Here's what I've done:
Push the local app to BitBucket
Clone the repo on Linode to: /srv/www/preziki/first_app
Bundle install
rake db:migrate
Update VirtualHost for preziki:
ServerAdmin oleg#preziki.com
ServerName preziki.com
ServerAlias www.preziki.com
DocumentRoot /srv/www/preziki/first_app/public
ErrorLog /srv/www/preziki/logs/error.log
CustomLog /srv/www/preziki/logs/access.log combined
a2ensite preziki
Restart apache
Reload apache
If I go to www.preziki.com (or 176.58.104.181), I see the default Rails "Welcome aboard" page. If you click the "About your application environment" link, you get the "Sorry but something went wrong" error. If I go to www.preziki.com/users, (like I could with localhost/users), I get teh "Sorry but something went wrong" error.
If I point VirtualHost to the dir where I have a "Hello world!" index.html file, then preziki.com displays it without a problem.
What am I doing wrong?
Thank you.
First thing you can see the "default Rails" environment, means check your web server(apache) is working fine. because its a static request.
Second things when you want to go into application environment, then their is a problem means your application is not deploy properly.
Few thing you need to check.
1. Give the application directory all permission.
2. bundle install properly
3. Set RailsENV in virtual host
4. rake db:migrate properly.
5. Check your log file what problem it is showing.
<VirtualHost *:80>
ServerName localhost
DocumentRoot /home/user/project/trunk/public
PassengerEnabled on
RailsEnv development
<Directory /home/user/project/trunk/public>
</Directory>
</VirtualHost>
It sounds like you're nearly there. My guess is that the app has a problem connecting to the database. But to see for yourself what the problem is, look in the production log file:
/srv/www/preziki/first_app/log/production.log
That will usually tell you everything you need to know. Another thing you can do to debug is to use the console on the server, in production mode:
bundle exec rails console production

setup a virtualhost on localhost

I am following the threads to set up a virtual host on stackoverflow. i did follwoing
<VirtualHost *:80>
ServerAdmin timy#yt.com
DocumentRoot "C:/www/test"
ServerName test.devsite-1.com
ServerAlias test.devsite-1.com
</VirtualHost>
in windows host file
127.0.0.1 test.devsite-1.com
I hit following url in browser
http://test.devsite-1.com/
The resulting page shows me the listing of folder i.e localhost page... where as I was expecting it will show the content of index.php placed in /test folder?
Can someone correct me if I am interpreting something wrong?
Regards
If you are being shown the contents of your test folder then maybe you need to define index.php as an index.
You could attempt with a index.html file inside the directory first, but i believe you are missing the DirectoryIndex directive in your Virtualhost configuration.
Try adding:
DirectoryIndex index.html index.php
to your Virtualhost configuration.
Try adding
DirectoryIndex index.php
to your virtualhost.
BTW: I would recommend using some kind of test.devsite-1.local so you don't accidently block the real test.devsite-1.com.

Resources