I know music theory, basic guitar chords and basic scales. What should I be focusing on practicing in order to compose or improvise rock guitar solos, and just play famous solos by ear? I am talking about solos like Hotel California, Stairway to Heaven, those from Slash, and those from the Rolling Stones. What scales should I be practicing, and how? And are there any composition techniques that are helpful? Are there any specific web resources that could help me?
You should focus on three related areas: scales, shapes and licks.
You've already said you know the theory, so that's great. Take the time to study the kind of solos you want to work on, and work out what scales those solos are using. Note where they switch from one scale to another.
It's definitely worth practising scales, so you have the positions in muscle memory.
After that, it's a matter of personal preference how you approach soloing. Some people like to take an analytical approach ("The song is in C, so I will use the G mixolydian scale"). Other people develop a more instinctive approach ("I know the note I want to hear next, and I know where it is on the fretboard").
Find your own preference.
A shape is like a mini scale; a cluster of fret positions that produce notes that fit well together. A shape tends to be movable. You'll notice that a lot of the classic rock/blues guitarists have signature shapes that they come back to again and again. Copy them, and build your own collection of favourite shapes.
Build on top of scales and shapes, are licks -- stock musical phrases. Again, you'll notice that classic rock guitarists tend to have licks that they reuse again and again. You can learn licks that sound impressive, then just throw them into any solo when it feels right.
A lot of electric guitar licks are likely to involve techniques such as bends, slides, hammer-ons etc. which you wouldn't have used practising straight scales.
There are books full of licks, and seeing them tabbed is a good way to get started.
It all comes down to practice and listening. In order to be able to write your own solos I would suggest the following:
- play along with solos by your favourite guitarists until you can play them note for note
- do the same for solos by other artists, maybe not your favourite, but those acknowledged to have well structured solos or melodies
- listen to genres outside your core - jazz is a useful one to help you understand alternate techniques, modes and note combinations (you might only like rock, but do this anyway - you will be a better soloist because of it!)
It takes time, but practice is what will do it!
This may seem too obvious, but I learned how to improvise solos mainly by reading transcriptions in magazines like Guitar For the Practicing Musician, Guitar World, and Guitar School. I preferred the GFTPM ones, because they would give more of the song (vocal melodies, bass transcriptions, and even drum transcriptions!).
So maybe get a transcribed book for a classic album by each master; and work them up!
[I know the question was geared towards "free" materials, but good transcriptions can save you lots of time (==money), not to mention frustration. In the magazines, they'll often give you a brief article about the techniques required (including exercises).]
The basics for any good rock guitar solos are scales. Practice scales, and you will have the best basic technique for playing (and composing/improvising) solos. There are some good answers that relates to this in this question: Why learn scales? What are they for?
About what kind of scales, and how to practice, you can find some useful answers in this question: Logical way to learn movable scales on guitar?