Clean URLs to my Drupal & site - url

I am new to Drupal &, I went through drupal guides for enabling clean urls, but at some point getting stuck. How to enable clean URLs in my Drupal 7 site?

First thing first, try enabling "rewrite" module for apache,
sudo a2enmod rewrite
After that You need to replace the occurrence of AllowOverride none to AllowOverride all in your site-available file
sudo vim /etc/apache2/sites-available/default
And finally you need to enable clean-url form your drupal site.
Home » Administration » Configuration » Search and metadata
OR navigate to
http://[your-site]/admin/config/search/clean-urls

Related

Does Puppet Dashboard work in Ruby Passenger 5?

Has anyone encountered problem of running Puppet Dashboard on Ruby Passenger 5? If yes does it really work with that Passenger version?
I've already setup and configured the necessary files required to run Puppet Dashboard via Passenger. Currently, the Apache test page is shown instead of the dashboard menu. This will not appear if Puppet-Dashboard is run in the lightweight Webrick server.
While scouring most of the installation samples and the manuals on how to install and configure it for Centos 6. I've seen most of them were based on Passenger 3 / 4. I am currently using 5.0.10 as it is used in conjunction with Puppet 3.8.1. One thing certain is that RailsAutoDetect is deprecated in version 5 and that has been commented out.
Below my puppet-dashboard.conf file (the load module has been moved to another file to avoid double-instantiation)
On the logs, the first error reported is that the path of /usr/share/puppet-dashboard/public/reports/upload is not there, so I've created those sub-folders to see if what would be the next error.
The next error in the log file after that is now shown like:
Attempt to serve directory: /usr/share/puppet-dashboard/public/reports/upload/
External node and node terminus option has been commented out as not to disrupt normal puppet run-interval activities during office hours.
PassengerHighPerformance on
PassengerMaxPoolSize 6
PassengerPoolIdleTime 1500
PassengerStatThrottleRate 120
Listen 3000
<VirtualHost *:3000>
ServerName mi-cloud-mgmt-config-01
ServerAlias mi-cloud-mgmt-config-01.mimos.local
RailsBaseURI /
PassengerAppRoot /usr/share/puppet-dashboard/
DocumentRoot /usr/share/puppet-dashboard/public/
# UPDATE THIS TO YOUR FQDN
<Directory /usr/share/puppet-dashboard/public/>
Options None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/httpd/dashboard_error.log
LogLevel debug
CustomLog /var/log/httpd/dashboard_access.log combined
ServerSignature Off
</VirtualHost>
Yes I have encountered the same issue. I tried to be clever and use the latest passenger for my Puppet Master as per the Puppet guide... https://docs.puppetlabs.com/guides/passenger.html#install-rackpassenger
But it looks like Dashboard doesn't support Passenger 5.x. Which is fair enough considering Dashboard is basically dead.
I noticed the structure of the directories under the <DocumentRoot> and <Directory> were different for Dashboard compared to Puppet Master, namely no config.ru being present.
So on CentOS 6 I tried the version of mod_passenger from EPEL repo mod_passenger-3.0.21-11.el6 and that worked for both Puppet Master and Dashboard.
According to some knowledgeable folks in #puppet IRC there should only be a minor lowering in performance with 3.x compared to 5.x.
Although it might need some tweaking it does work on passenger 5.
I use Nginx but if it works using Nginx it should on apache as well.
I use passenger-5.0.13 with ruby 1.9.1 to run puppet dashboard.

Issue on Redirecting Projects on WampServer Index Page

Using WampServer 2.5 on Windows 7 Ultimate 64 bit I am not able to redirect from Wamp index page to Projects URL. For example, I have a Project called "Proj 1" which listed under "Your Projects" but when I click on that the address bar only change to
Proj 1
and I get this error message on page Oops! Google Chrome could not find Proj 1
and when I add localhost/ to the URL inbox it works fine. I tried to re install the Wamp several times but it didn't fix the issue.
Can you please let me know why this is happening and how I can fix this?
The QUICK AND DIRTY way to revert back to the old way and undo this new INTENDED functionality is:-
Edit \wamp\index.php
Find this line at aprox line 34
$suppress_localhost = true;
And change it to
$suppress_localhost = false;
CORRECT Solution
Is to create a VirtualHost for each of your projects that you want to store under the \wamp\www\ folder. Or anywhere else for that matter.
Edit the file \wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf
change version number to match your installed version of apache
Remove its default contents and add this to define your first VirtualHost definition
<VirtualHost *:80>
ServerName proj1
DocumentRoot C:/wamp/www/proj1
<Directory "C:/wamp/www/proj1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require local
</Directory>
</VirtualHost>
Save it!
Now edit the httpd.conf file ( using the wampmanager menu links ) and uncomment the line that includes the file we have just changed.
Find
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
And remove the # comment character like so :-
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
Now edit the HOSTS file C:\windows\system32\drivers\etc\hosts and add a new line to tell windows that there is a site called proj1 so it should end up looking like this :-
127.0.0.1 localhost
::1 localhost
127.0.0.1 proj1
::1 proj1
Remember you have to be an Administrator to edit the hosts file!!! Hit the Windows key, type note, right click on Notepad and choose Run as Administrator.
Now to apply that change to the HOSTS file either reboot or
Start a command window using "Run as Administrator" and run these 2 commands :-
net stop Dnscache
net start Dnscache
This will refresh the windows DNS cache, and you new site will be addressable.
Now last of all restart the Apache service so it picks up your new VirtualHost definition.
wampmanager -> Apache -> Service -> Restart service
PS: Remove the space from the "proj 1" folder name. Spaces can cause odd issues. Remember Apache was ported from Unix and Unix does not really like spaces in directory names.
One option could be updating the www index.php (Line 338) from
$projectContents .= '<li>'.$file.'</li>';
to
$projectContents .= '<li>'.$file.'</li>';

redirect to a subdomain in rails 3

I just set up my rails 3 on Amazon EC2 with apache2 and passenger.
Everything is working great but when I created my first project inside
/var/www/html/ror/public/ the project does not show up. I tried mydomain.com/example which is the name of my project and it gives me an index of my rails project that I generated earlier. When I say index I mean a list of all the folders without rendering any html from the views. I guess my question is: how do I redirect the user to mydomain.com/example/app/views/example/index.html.erb
I tried playing around with httpd.conf and but nothing seems to work out.
Thanks
You are facing problems in deploying the site. Follow this -
Create a virtual host
$ sudo nano /etc/apache2/sites-available/app-name
Change the contents of the virtual host to
<VirtualHost *:80>
ServerName A.B.C.D
ServerAlias subdomain.abc.com
DocumentRoot /var/www/app-name/current/public
RackEnv production
</VirtualHost>
Enable the new site
$ sudo a2ensite demo-app
Restart Apache
$ sudo /etc/init.d/apache2 restart
Make sure you mention the correct document root.
DocumentRoot /var/www/app-name/current/public
More details - https://docs.google.com/document/d/1Cw-oiE4AYrnbo_b7o593npTPaW8hRhRZERJ_ZETdrB8/edit?hl=en
You need to add RailsBaseURI /ror/public to your apache config.
Or, symlink:
mkdir /var/rails
mv /var/www/html/ror /var/rails
cd /var/www/html
ln -s /var/www/html/ror/public ror
(shouldn't put Rails app sources in your apache document tree)
and then RailsBaseURI /ror
Your app will be at example.com/ror

When deploying a Rails 3 app with Capistrano 2.5.19, what should be in shared/system?

I am running Passenger with Apache2 on Ubuntu. I'm trying to get an idea what I should be looking at, and my suspicion lies with my Capistrano configuration / permissions.
My application seems to be deployed to current as expected. I can see all the project files. I see a symlink in the current/public directory to shared/system. When I look at the contents of shared/system, there is nothing, no symlink or files. Is this correct? Is a symlink missing?
Capistrano deployment file:
https://github.com/danieldbower/passhasher/blob/master/config/deploy.rb
Logged message in Apache:
Apache/2.2.16 (Ubuntu) Phusion_Passenger/3.0.2 mod_ssl/2.2.16 OpenSSL/0.9.8o configured -- resuming normal operations
Directory index forbidden by Options directive: /var/www/passhasher/
Apache Config:
Alias /passhasher /var/www-rails/passhasher/current/public
<Directory /var/www-rails/passhasher/current/public>
AllowOverride all
Options -MultiViews
</Directory>
This is the default folder in which you keep all files not related to a particular version of your deployment.
I put the users' uploads inside.
Have a look here:
http://blog.alastairdawson.com/2007/03/13/stop-uploaded-files-getting-deleted-with-capistrano/

Do I need to modify httpd.conf to get symfony to wor

Can someone tell me is it necessary to modify httpd.conf to get symfony to work? I am following a tutorial which says I need to edit httpd.conf file but my provider does not give me access to that file.
from tutrial: http://www.symfony-project.org/cookbook/1_2/en/web_server
Alias
If you already have a website on a
domain name, and if you wish that your
symfony application can be accessed
within this domain, then the virtual
host solution cannot work. For
instance, let's assume that you want
to access our symfony application
with:
To do that, open the httpd.conf and
add the following lines:
Alias /myapp/
Alias /myapp/ /home/steve/myproject/web/
<Directory "/home/steve/myproject/web">
AllowOverride All
Allow from All
</Directory>
You can install symfony without access to http.conf. If your provider lets you choose the directory of the web root, choose yourapp/web directory. If the root directory is fixed, then make it a link to yourapp/web . If you want to have access to the images of the development bar (that normaly is not needed in production), then place a link in web/sf to lib/vendor/symfony/data/web/sf.

Resources